sim_utility: Simulate utility after IPS

Description Usage Arguments Details Value Examples

Description

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.

Usage

1
2
3
4
5
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)

Arguments

simhaq

Simulation output from sim_iviRA. Must include columns yrlen for year length of model cycle, sim for simulation number, and si for whether a serious infection occured during the model cycle.

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 utility.mixture returned by sample_pars). to sample_pars.

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.wailoo returned by sample_pars). Note that the matrix columns must contain the exact same variables as generated by sample_pars.

utility

Simulated utility from sim_utility_mixture or sim_utility_wailoo.

si_ul

Sampled utility loss. Equivalent to output si.ul from sample_pars.

x_attr

Treatment attribute data (e.g., ouptut x.attr from get_input_data)

tx_attr_coef

Distribution of coefficient vector for treatment attributes (e.g., output utility.tx.attr from sample_pars.)

simhaq

Simulation output from sim_iviRA. Variables needed are sim, id, age, and haq.

Details

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.

Value

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)
head(utility.wailoo)   
head(qalys.mix)

InnovationValueInitiative/IVI-RA documentation built on Oct. 20, 2020, 10:02 p.m.