{"action":"created","issue":{"url":"https://api.github.com/repos/gluc/data.tree/issues/26","labels_url":"https://api.github.com/repos/gluc/data.tree/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/gluc/data.tree/issues/26/comments","events_url":"https://api.github.com/repos/gluc/data.tree/issues/26/events","html_url":"https://github.com/gluc/data.tree/issues/26","id":104414817,"number":26,"title":"sensitivity analysis in a decision tree","user":{"login":"vnijs","id":2998956,"avatar_url":"https://avatars.githubusercontent.com/u/2998956?v=3","gravatar_id":"","url":"https://api.github.com/users/vnijs","html_url":"https://github.com/vnijs","followers_url":"https://api.github.com/users/vnijs/followers","following_url":"https://api.github.com/users/vnijs/following{/other_user}","gists_url":"https://api.github.com/users/vnijs/gists{/gist_id}","starred_url":"https://api.github.com/users/vnijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vnijs/subscriptions","organizations_url":"https://api.github.com/users/vnijs/orgs","repos_url":"https://api.github.com/users/vnijs/repos","events_url":"https://api.github.com/users/vnijs/events{/privacy}","received_events_url":"https://api.github.com/users/vnijs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-02T06:59:12Z","updated_at":"2016-01-15T12:51:49Z","closed_at":null,"body":"Hi @gluc\r\n\r\nIf you want to do some sensitivity analysis on a decision tree you could manually change some of the probabilities and/or payoffs in the yaml file and then rerun the analysis. However, because probabilities for chance nodes are related this is likely to lead to (input) errors, especially if a subtree is repeated several times.\r\n\r\nTaking your jennylind example I am using at: https://internal.shinyapps.io/vnijs/quant/?SSUID=b04da779d8  it would be useful to do allow a user to provide input like the below in a text input:\r\n\r\n`Small Box Office` <- c(.1, .2, .3)\r\n`Median Box Office` <- 1 - `Small Box Office`\r\n\r\nI'd pass these values to a function that would loop through the input values, update the relevant values in the  `Node` object, and then re-calculate the tree for each value.\r\n\r\nUltimately I'd like to use something like `expand.grid` so multiple inputs could be easily updated across a range of values (e.g., payoffs for Small Box Office from 200K to 400K in 50K increments together with changing probabilities to generate something like a spider plot). \r\n\r\nI think it would be reasonably straightforward if I could use something like `ToDataFrameTaxonomy`, update the table, and then convert back to a `Node` object. However, I doubt that would be very efficient.\r\n\r\nAny suggestions on how to best update specific `Node` values in an iterative fashion for sensitivity analysis?\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/gluc/data.tree/issues/comments/171952362","html_url":"https://github.com/gluc/data.tree/issues/26#issuecomment-171952362","issue_url":"https://api.github.com/repos/gluc/data.tree/issues/26","id":171952362,"user":{"login":"gluc","id":626832,"avatar_url":"https://avatars.githubusercontent.com/u/626832?v=3","gravatar_id":"","url":"https://api.github.com/users/gluc","html_url":"https://github.com/gluc","followers_url":"https://api.github.com/users/gluc/followers","following_url":"https://api.github.com/users/gluc/following{/other_user}","gists_url":"https://api.github.com/users/gluc/gists{/gist_id}","starred_url":"https://api.github.com/users/gluc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluc/subscriptions","organizations_url":"https://api.github.com/users/gluc/orgs","repos_url":"https://api.github.com/users/gluc/repos","events_url":"https://api.github.com/users/gluc/events{/privacy}","received_events_url":"https://api.github.com/users/gluc/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T12:51:49Z","updated_at":"2016-01-15T12:51:49Z","body":"@vnijs : Check out https://github.com/gluc/ahp \r\nI've implemented many of the above ideas for the Analytic Herarchy Process. Might be time for a dedicated DecisionTree package ;-)"}}