[R] Decision Trees /Decision Analysis with R?

Kjetil Halvorsen kjetilbrinchmannhalvorsen at gmail.com
Wed Jun 8 23:25:25 CEST 2011


see inline below.

On Wed, Jun 8, 2011 at 12:37 PM, Anupam <anupamtg at gmail.com> 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: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of Jonathan Daily
> Sent: Wednesday, June 08, 2011 7:47 PM
> To: stefan.duke at gmail.com
> Cc: r-help at r-project.org
> 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, stefan.duke at gmail.com
> <stefan.duke at gmail.com> 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 <biomathjdaily at gmail.com>
> 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, stefan.duke at gmail.com
>>> <stefan.duke at gmail.com> 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.)
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org 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.
>
> ______________________________________________
> R-help at r-project.org 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.
>
> ______________________________________________
> R-help at r-project.org 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.
>



More information about the R-help mailing list