Simulate change in HAQ at 6 months using different model structures relating treatment to HAQ.
sim_dhaq6(treatments, input_data, pars, tx_lookup = iviRA::treatments$sname, hist = c("naive", "experienced"), line = 1, tx_ihaq = c("acr-haq", "acr-eular-haq", "haq"))
treatments | Vector of treatments to simulate. Should correpond to |
---|---|
input_data | An object of class |
pars | List of sampled parameter values generated from get_input_data. The only
elements required are |
tx_lookup | Vector of treatments with names equivalent to |
hist | Is the patient tDMARD naive or tDMARD experienced? |
line | Line of therapy |
tx_ihaq | Equivalent to argument |
A data.table
with the following columns:
Treatment index based on tx_lookup
.
The model structure component relating treatment to change in HAQ
(i.e., tx_ihaq
).
Simulation number denoting a randomly sampled parameter set from sample_pars.
ID number denoting a simulated patients (e.g., from sample_pop).
Change in HAQ score from baseline at 6 months.
pop <- sample_pop(n = 10) input.dat <- get_input_data(pop = pop) parsamp <- sample_pars(n = 10, input_data = input.dat) sim <- sim_dhaq6(treatments = c("cdmards", "adamtx"), input_data = input.dat, pars = parsamp, tx_ihaq = c("acr-haq", "acr-eular-haq")) head(sim)#> tx model sim id dhaq #> 1: 1 acr-haq 1 1 -0.4406861 #> 2: 1 acr-haq 1 2 -0.1719505 #> 3: 1 acr-haq 1 3 -0.1719505 #> 4: 1 acr-haq 1 4 -0.1719505 #> 5: 1 acr-haq 1 5 -0.1719505 #> 6: 1 acr-haq 1 6 -0.1719505tail(sim)#> tx model sim id dhaq #> 1: 4 acr-eular-haq 10 5 -0.2492727 #> 2: 4 acr-eular-haq 10 6 0.0000000 #> 3: 4 acr-eular-haq 10 7 -0.5432509 #> 4: 4 acr-eular-haq 10 8 -0.2492727 #> 5: 4 acr-eular-haq 10 9 -0.5432509 #> 6: 4 acr-eular-haq 10 10 -0.5432509