R/calc_expectedValues.R
MonteCarlo_expectedValues.Rd
Results are returned for the nodes labelled logical in decision tree. Require at least one logical node.
MonteCarlo_expectedValues(osNode, n) # S3 method for default MonteCarlo_expectedValues(osNode, ...) # S3 method for costeffectiveness_tree MonteCarlo_expectedValues(osNode, n = 100)
osNode | A data.tree object with class costeffectiveness_tree |
---|---|
n | Number of simulations |
list containing array of n sets of expected values and sampled nodes full names
# NOT RUN { ## read-in decision tree osNode <- costeffectiveness_tree(yaml_tree = "raw data/LTBI_dtree-cost-distns.yaml") print(osNode, "type", "p", "distn", "mean", "sd") ## calculate a single realisation expected values osNode <- calc_expectedValues(osNode) print(osNode, "type", "p", "distn", "mean", "sd", "payoff") ## calculate multiple realisation for specific nodes MonteCarlo_expectedValues(osNode, n=100) # }