5

Currently taking a course on decision analysis. There is a concept called "flipping a probability tree", illustrated in the following example.

enter image description here

May I know:

(1) Is there a way to do the above graphically in R? I tried looking at packages like rpart, party, rpart.plot but didn't get very far.

(2) If graphical representation is not possible, are there existing R functions that can easily calculate the various branch probabilities, endpoint probabilities?

dwstu
  • 839
  • 10
  • 12
  • 1
    Note that rpart, party and rpart.plot are packages to fit classification/regression trees, which are a different concept to probability trees. – Hong Ooi Sep 20 '14 at 10:16
  • @Hong Ooi, thank you. So are you aware of R functions / packages that can do the above? – dwstu Sep 20 '14 at 16:27
  • I don't know if there are `R` package(s) that will draw probability trees with a few lines of code. But if you're willing to put in some effort, here are three resources for learning how draw node-and-edge diagrams with lower-level commands: [How To Plot A Graph Using Rgraphviz](http://www.bioconductor.org/packages/release/bioc/vignettes/Rgraphviz/inst/doc/Rgraphviz.pdf); [Improving the 'gridGraphviz' package in R](https://www.stat.auckland.ac.nz/~paul/Reports/gridGraphviz/gridGraphviz.html); [Drawing Diagrams with R](http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Murrell.pdf). – eipi10 Sep 20 '14 at 23:10
  • @dwstu: Can you share the course? I am trying to learn this stuff. – val Mar 31 '20 at 19:48

0 Answers0