Simulate utility after running sim_iviRA with output = "data"
. This can be useful
in cases where you want to use a different algorithm to estimate utility, but do not want to rerun
the entire simulation.
sim_utility_mixture(simhaq, male, pars) sim_utility_wailoo(simhaq, haq0, male, prev_dmards, coefs) sim_qalys(simhaq, utility, si_ul, x_attr, tx_attr_coef)
simhaq | Simulation output from sim_iviRA. Must include columns |
---|---|
male | Indicator = 1 for males and 0 for females. |
pars | List of sampled parameters needed to simulate utility using the Hernandez Alava (2013) mixture
model (i.e., the element |
haq0 | HAQ score at baseline. |
prev_dmards | Number of previous DMARDs. |
coefs | Matrix of sampled coefficients needed to simulate utility using the Wailoo (2006) model
(i.e., the element |
utility | Simulated utility from |
si_ul | Sampled utility loss. Equivalent to output |
x_attr | Treatment attribute data (e.g., ouptut |
tx_attr_coef | Distribution of coefficient vector for treatment attributes (e.g., output
|
simhaq | Simulation output from sim_iviRA. Variables needed are |
For sim_utility_mixture
and sim_utility_wailoo
, a vector of
simulated utility for each row returned in simhaq
. For sim_qalys
, a vector
of QALYs for each row in simhaq
.
Note that disease duration is set to 18.65 years in sim_utility_wailoo
, which
is the mean value from the Wailoo (2006) paper used for the parameter estimates. Age and
the HAQ score are taken from the simulation output.
pop <- sample_pop(n = 10) tx.seq <- c("adamtx", "cdmards") mod.structs <- select_model_structures(utility_model = "wailoo") input.dat <- get_input_data(pop = pop) parsamp <- sample_pars(n = 10, input_dat = input.dat) sim.out <- sim_iviRA(tx_seqs = tx.seq, input_data = input.dat, pars = parsamp, model_structures = mod.structs, output = "data") utility.mix <- sim_utility_mixture(simhaq = sim.out, male = pop[, "male"], pars = parsamp$utility.mixture) utility.wailoo <- sim_utility_wailoo(simhaq = sim.out, haq0 = pop[, "haq0"], male = pop[, "male"], prev_dmards = pop[, "prev_dmards"], coefs = parsamp$utility.wailoo) qalys.mix <- sim_qalys(simhaq = sim.out, utility = utility.mix, si_ul = parsamp$si.ul, x_attr = input.dat$x.attr, tx_attr_coef = parsamp$utility.tx.attr) head(utility.mix)#> [1] 0.6555519 0.6814161 0.6597661 0.6957064 0.6687879 0.6024492head(utility.wailoo)#> [1] 0.8773545 0.8784677 0.8795721 0.8806678 0.8817549 0.8828334head(qalys.mix)#> [1] 0.3277759 0.3407080 0.3298831 0.3478532 0.3343940 0.3012246