sim_dhaq6: Simulate change in HAQ at 6 months

Description Usage Arguments Value Examples

View source: R/ips.R

Description

Simulate change in HAQ at 6 months using different model structures relating treatment to HAQ.

Usage

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

Arguments

treatments

Vector of treatments to simulate. Should correpond to sname in iviRA::treatments.

input_data

An object of class input_data returned from get_input_data. The only elements required are x_acr and x_haq.

pars

List of sampled parameter values generated from get_input_data. The only elements required are acr, haq, acr2haq, acr2eular, and eular2haq.

tx_lookup

Vector of treatments with names equivalent to iviRA::treatments$sname. Index of treatments in treatments are matched against treatments in tx_lookup by name. Indices of parameter estimates from the network meta-analyses bust be in the same order as in tx_data.

hist

Is the patient tDMARD naive or tDMARD experienced?

line

Line of therapy

tx_ihaq

Equivalent to argument tx_haq in select_model_structures.

Value

A data.table with the following columns:

tx

Treatment index based on tx_lookup.

model

The model structure component relating treatment to change in HAQ (i.e., tx_ihaq).

sim

Simulation number denoting a randomly sampled parameter set from sample_pars.

id

ID number denoting a simulated patients (e.g., from sample_pop).

dhaq

Change in HAQ score from baseline at 6 months.

Examples

1
2
3
4
5
6
7
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)                 
tail(sim)

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