Run Sensitivity Analysis

run_dsa(model, dsa)

Arguments

model

An evaluated Markov model.

dsa

An object returned by define_dsa().

Value

A data.frame with one row per model and parameter value.

Examples

param <- define_parameters( p1 = .5, p2 = .2, r = .05 ) mod1 <- define_strategy( transition = define_transition( C, p1, p2, C ), define_state( cost = discount(543, r), ly = 1 ), define_state( cost = discount(432, r), ly = .5 ) )
#> No named state -> generating names.
#> No named state -> generating names.
mod2 <- define_strategy( transition = define_transition( C, p1, p2, C ), define_state( cost = 789, ly = 1 ), define_state( cost = 456, ly = .8 ) )
#> No named state -> generating names.
#> No named state -> generating names.
res2 <- run_model( mod1, mod2, parameters = param, init = c(100, 0), cycles = 10, cost = cost, effect = ly )
#> No named model -> generating names.
ds <- define_dsa( p1, .1, .9, p2, .1, .3, r, .05, .1 ) print(ds)
#> Low High #> p1 0.1 0.9 #> p2 0.1 0.3 #> r 0.05 0.1
x <- run_dsa(res2, ds)
#> Running DSA on strategy 'I'...
#> Running DSA on strategy 'II'...
plot(x, value = "cost")
#> Joining, by = ".strategy_names"
# can be specified as a function of other parameters ds2 <- define_dsa( p2, p1 - .1, p1 + .1 ) run_dsa(res2, ds2)
#> Running DSA on strategy 'I'...
#> Running DSA on strategy 'II'...
#> A sensitivity analysis on 1 parameters. #> #> Parameters: #> -p2 #> #> Sensitivity analysis: #> #> cost ly .n_indiv .par_value_eval Cost Effect #> I, p2 = p1 - 0.1 394005.2 739.1975 100 0.4 0.000 0.000000 #> II, p2 = p1 - 0.1 615305.6 895.6790 100 0.4 2213.004 1.564815 #> I, p2 = p1 + 0.1 401420.1 782.0248 100 0.6 0.000 0.000000 #> II, p2 = p1 + 0.1 643828.5 912.8099 100 0.6 2424.084 1.307851 #> ICER Cost Diff. Effect Diff. Ref. .nmb .dnmb #> I, p2 = p1 - 0.1 - - - - 0.00 - #> II, p2 = p1 - 0.1 1414.227 2213.004 1.564815 I 44731.44 44731.44 #> I, p2 = p1 + 0.1 - - - - 0.00 - #> II, p2 = p1 + 0.1 1853.486 2424.084 1.307851 I 36811.45 36811.45