|
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. |
|
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-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
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-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
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-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
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 [[alternative HTML version deleted]] ______________________________________________ [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. |
|
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-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
In reply to this post by Jonathan Daily
It is difficult for someone from a statistical frame of mind to understand
what this is about --- you need to think a bit differently. It is mostly a simulation and decision analysis, with some use of statistical functions to draw random samples to simulate the fact that outcome of interest can take any value from a known or unknown distribution. For example, you may be comparing two interventions and a do-nothing decision to improve some health outcome of interest. The decision maker is interested in *relative* effectiveness and costs of the interventions to improve the outcome of interest. You have results from published literature that you can use as inputs into a simulation exercise to compare relative costs and benefits/effectiveness of the three options. A small decision tree can be easily simulated in a spreadsheet; for long trees with many decision nodes it is useful to have a specialized software. There are some Excel plugins that are sold about $100. Others are more expensive. I think R is not well suited for this kind of work. A decision analysis package in R may require user to write code like the one used in LaTeX or related programs (Metapost) to draw graphs of trees (e.g. complicated organizational trees, or hierarchical trees). However, in such a package there can be useful outputs, measures and graphs generated by R using code that may already exist for other packages. Look up journal "Medical Decision Making" to know what is being discussed. This method is used extensively in medicine and public health to study decisions. It even uses MCMC, though with a different flavor --- it may even be a different kind of food. Anupam. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Jonathan Daily Sent: Wednesday, June 08, 2011 7:47 PM To: [hidden email] Cc: [hidden email] Subject: Re: [R] 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]> >> 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+Decisi >> on+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 >>> 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-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ [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. |
|
see inline below.
On Wed, Jun 8, 2011 at 12:37 PM, Anupam <[hidden email]> wrote: > It is difficult for someone from a statistical frame of mind to understand > what this is about --- you need to think a bit differently. It is mostly a > simulation and decision analysis, with some use of statistical functions to > draw random samples to simulate the fact that outcome of interest can take > any value from a known or unknown distribution. For example, you may be > comparing two interventions and a do-nothing decision to improve some health > outcome of interest. The decision maker is interested in *relative* > effectiveness and costs of the interventions to improve the outcome of > interest. You have results from published literature that you can use as > inputs into a simulation exercise to compare relative costs and > benefits/effectiveness of the three options. A small decision tree can be > easily simulated in a spreadsheet; for long trees with many decision nodes > it is useful to have a specialized software. There are some Excel plugins > that are sold about $100. Others are more expensive. > > I think R is not well suited for this kind of work. A decision analysis Not necessarily! A desicion tree model is a kind of graphical model. See the CRAN task view gR (graphical models in R) and maybe ask on the special interest mailing list R-sig-gR kjetil > package in R may require user to write code like the one used in LaTeX or > related programs (Metapost) to draw graphs of trees (e.g. complicated > organizational trees, or hierarchical trees). However, in such a package > there can be useful outputs, measures and graphs generated by R using code > that may already exist for other packages. > > Look up journal "Medical Decision Making" to know what is being discussed. > This method is used extensively in medicine and public health to study > decisions. It even uses MCMC, though with a different flavor --- it may even > be a different kind of food. > > Anupam. > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of Jonathan Daily > Sent: Wednesday, June 08, 2011 7:47 PM > To: [hidden email] > Cc: [hidden email] > Subject: Re: [R] 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+Decisi >>> on+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-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > [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. > ______________________________________________ [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. |
|
thanks for the hint, Kjetil. That looks more like what I am looking for.
Thanks for all your mails! Best, Stefan On Wed, Jun 8, 2011 at 11:25 PM, Kjetil Halvorsen <[hidden email]> wrote: > see inline below. > > On Wed, Jun 8, 2011 at 12:37 PM, Anupam <[hidden email]> wrote: >> It is difficult for someone from a statistical frame of mind to understand >> what this is about --- you need to think a bit differently. It is mostly a >> simulation and decision analysis, with some use of statistical functions to >> draw random samples to simulate the fact that outcome of interest can take >> any value from a known or unknown distribution. For example, you may be >> comparing two interventions and a do-nothing decision to improve some health >> outcome of interest. The decision maker is interested in *relative* >> effectiveness and costs of the interventions to improve the outcome of >> interest. You have results from published literature that you can use as >> inputs into a simulation exercise to compare relative costs and >> benefits/effectiveness of the three options. A small decision tree can be >> easily simulated in a spreadsheet; for long trees with many decision nodes >> it is useful to have a specialized software. There are some Excel plugins >> that are sold about $100. Others are more expensive. >> >> I think R is not well suited for this kind of work. A decision analysis > > Not necessarily! A desicion tree model is a kind of graphical model. > See the CRAN task view gR > (graphical models in R) and maybe ask on the special interest mailing > list R-sig-gR > > kjetil > >> package in R may require user to write code like the one used in LaTeX or >> related programs (Metapost) to draw graphs of trees (e.g. complicated >> organizational trees, or hierarchical trees). However, in such a package >> there can be useful outputs, measures and graphs generated by R using code >> that may already exist for other packages. >> >> Look up journal "Medical Decision Making" to know what is being discussed. >> This method is used extensively in medicine and public health to study >> decisions. It even uses MCMC, though with a different flavor --- it may even >> be a different kind of food. >> >> Anupam. >> -----Original Message----- >> From: [hidden email] [mailto:[hidden email]] On >> Behalf Of Jonathan Daily >> Sent: Wednesday, June 08, 2011 7:47 PM >> To: [hidden email] >> Cc: [hidden email] >> Subject: Re: [R] 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+Decisi >>>> on+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-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> >> ______________________________________________ >> [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. >> > ______________________________________________ [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. |
|
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)
|
|
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 |
| Powered by Nabble | Edit this page |
