# Decision Trees /Decision Analysis with R?

11 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Decision Trees /Decision Analysis with R?

 Hello, this question is a bit out of the blue. I am a big R fan and user and in my new job I do some decision modeling (mostly health economics). For that decision trees are often used (I guess the most classic example is the investment decision A, B, and C with different probabilities, what is the expected payoff). We use a specialized software called TreeAge that some might know. The basic setup of such simulations is actually very simple and I guess useful in many fields. So I was wondering whether there is already a package out there in R that is doing such a thing? Thanks for any hints! Best, Stefan PS (By decision tree I don't mean cluster-like analysis of a data set splitting by identifying decision nods, but the other way around: I have decision nodes, what is my expected outcome.) ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 See packages rpart, randomForest, party. Also, typing "R Decision Trees" produced good google results. http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=R+Decision+TreesOn Wed, Jun 8, 2011 at 7:02 AM, [hidden email] <[hidden email]> wrote: > Hello, > > this question is a bit out of the blue. > > I am a big R fan and user and in my new job I do some decision > modeling (mostly health economics). For that decision trees are often > used (I guess the most classic example is the investment decision A, > B, and C with different probabilities, what is the expected payoff). > We use a specialized software called TreeAge that some might know. > The basic setup of such simulations is actually very simple and I > guess useful in many fields. So I was wondering whether there is > already a package out there in R that is doing such a thing? > > Thanks for any hints! > Best, > Stefan > > PS > (By decision tree I don't mean cluster-like analysis of a data set > splitting by identifying decision nods, but the other way around: I > have decision nodes, what is my expected outcome.) > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. > -- =============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 Thank you so much for reply. But I am looking for the exact opposite. I do not have a data set which I want to partition. But already a sequence/tree-like set of decision rules and with which I want to simulate what is my expected outcome/pay-off given a particular scenario. As far as I understand it, those packages could calculate the expected outcome AFTER having fit them to a particular data set and not construct a "synthetic" tree with exogenously defined decision nods/rules. Or am I wrong? Thanks and best, Stefan On Wed, Jun 8, 2011 at 2:03 PM, Jonathan Daily <[hidden email]> wrote: > See packages rpart, randomForest, party. > > Also, typing "R Decision Trees" produced good google results. > > http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=R+Decision+Trees> > On Wed, Jun 8, 2011 at 7:02 AM, [hidden email] > <[hidden email]> wrote: >> Hello, >> >> this question is a bit out of the blue. >> >> I am a big R fan and user and in my new job I do some decision >> modeling (mostly health economics). For that decision trees are often >> used (I guess the most classic example is the investment decision A, >> B, and C with different probabilities, what is the expected payoff). >> We use a specialized software called TreeAge that some might know. >> The basic setup of such simulations is actually very simple and I >> guess useful in many fields. So I was wondering whether there is >> already a package out there in R that is doing such a thing? >> >> Thanks for any hints! >> Best, >> Stefan >> >> PS >> (By decision tree I don't mean cluster-like analysis of a data set >> splitting by identifying decision nods, but the other way around: I >> have decision nodes, what is my expected outcome.) >> >> ______________________________________________ >> [hidden email] mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html>> and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > =============================================== > Jon Daily > Technician > =============================================== > #!/usr/bin/env outside > # It's great, trust me. > ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 So TreeAge fits models but won't predict from them? That seems like bizarre behavior. I suppose I would recommend, then, looking at the source code from the aforementioned packages for how they store their split data. It sounds like you would have to write code to hack TreeAge outputs into another packages' format (e.g. look at ?rpart.object). Sorry I couldn't help more, Jon On Wed, Jun 8, 2011 at 9:47 AM, [hidden email] <[hidden email]> wrote: > Thank you so much for reply. But I am looking for the exact opposite. > > I do not have a data set which I want to partition. But already a > sequence/tree-like set of decision rules and with which I want to > simulate what is my expected outcome/pay-off given a particular > scenario. > As far as I understand it, those packages could calculate the expected > outcome AFTER having fit them to a particular data set and not > construct a "synthetic" tree with exogenously defined decision > nods/rules. Or am I wrong? > > > Thanks and best, > Stefan > > > > On Wed, Jun 8, 2011 at 2:03 PM, Jonathan Daily <[hidden email]> wrote: >> See packages rpart, randomForest, party. >> >> Also, typing "R Decision Trees" produced good google results. >> >> http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=R+Decision+Trees>> >> On Wed, Jun 8, 2011 at 7:02 AM, [hidden email] >> <[hidden email]> wrote: >>> Hello, >>> >>> this question is a bit out of the blue. >>> >>> I am a big R fan and user and in my new job I do some decision >>> modeling (mostly health economics). For that decision trees are often >>> used (I guess the most classic example is the investment decision A, >>> B, and C with different probabilities, what is the expected payoff). >>> We use a specialized software called TreeAge that some might know. >>> The basic setup of such simulations is actually very simple and I >>> guess useful in many fields. So I was wondering whether there is >>> already a package out there in R that is doing such a thing? >>> >>> Thanks for any hints! >>> Best, >>> Stefan >>> >>> PS >>> (By decision tree I don't mean cluster-like analysis of a data set >>> splitting by identifying decision nods, but the other way around: I >>> have decision nodes, what is my expected outcome.) >>> >>> ______________________________________________ >>> [hidden email] mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html>>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> >> >> -- >> =============================================== >> Jon Daily >> Technician >> =============================================== >> #!/usr/bin/env outside >> # It's great, trust me. >> > -- =============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 Jon, So TreeAge fits models but won't predict from them? That seems like > bizarre behavior. > Nothing bizarre about TreeAge, just a different tool in a different disicpline. http://en.wikipedia.org/wiki/Decision_treeGraham         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 TreeAge works just fine. But its commercial, thats all... On Wed, Jun 8, 2011 at 6:17 PM, Graham Smith <[hidden email]> wrote: > Jon, > >> So TreeAge fits models but won't predict from them? That seems like >> bizarre behavior. > > Nothing bizarre about TreeAge, just a different tool in a different > disicpline. > > http://en.wikipedia.org/wiki/Decision_tree> > > Graham > ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 This post has NOT been accepted by the mailing list yet. Another possibility would be to do something similar to the treeplan package (runs on excel) and then use RExcel on top of it.  Would be great to use the simulation capabilities of R for sensitivity analyses in decision analysis, not to mention that the package could be extended to run markov models (which, unlikely treeage, treeplan doesn't run)
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decision Trees /Decision Analysis with R?

 Hi, Unfortunately I do not have an answer to this question yet, but it is something I'm currently examining. We're hoping to construct a template for health economic evaluation using decision tree (eventually working up to more complex modelling methodologies). I'll keep you posted on our progress. Ian