The IVI-RA model simulates outcomes conditional on parameters and data. Given a patient population, we can generate the required data with the function get_input_data.

input.dat <- get_input_data(pop = pop)
names(input.dat)
##  [1] "n"           "haq0"        "age"         "male"        "das28"      
##  [6] "sdai"        "cdai"        "weight"      "prev.dmards" "x.mort"     
## [11] "x.acr"       "x.haq"       "x.das28"     "x.ttd.all"   "x.ttd.eular"
## [16] "x.ttd.da"    "x.attr"

The function returns all patient characteristics needed to run the simulation (HAQ score at baseline, age, gender, DAS28, SDAI, CDAI, weight, and the number of previous DMARDs). It also stores a number of of matrices of explanatory variables. Details about each matrix are provided in the table below. The first column is the name of the matrix, the second column provides a description of the variables included, and the third column is the name of the corresponding parameter object returned by the function sample_pars.

Design matrix Description Parameters
x.acr Variables known at baseline that are used to predict the relative treatment effects for ACR response. By default, only includes an intercept, which implies that there are no treatment-by-covariate interactions. acr$d
x.haq Variables known at baseline that are used to predict the relative treatment effects for change in HAQ from baseline. By default, only includes an intercept, which implies that there are no treatment-by-covariate interactions. haq$d
x.das28 Variables known at baseline that are used to predict the relative treatment effects for change in DAS28 from baseline. By default, only includes an intercept, which implies that there are no treatment-by-covariate interactions. das28$d
x.ttd.all Variables known at baseline influencing treatment duration in a model representative of all patients. Explanatory variables correspond to the vector of coefficients using to predict the location parameter for each distribution. ttd.all
x.ttd.eular Variables known at baseline influencing treatment duration when separate models are estimated by EULAR response category. Explanatory variables correspond to the vector of coefficients using to predict the location parameter for each distribution. ttd.eular
x.ttd.da Variables known at baseline influencing treatment duration in models where treatment duration is a function of disease activity. The first column is the intercept, the second column is a dummy variable used to indicate whether a patient has moderate disease activity, and the third column is a dummy variable used to indicate wethe a patient has high disease activity (note, however, that the second and third columns are updated during the simulation according to the simulated disease activity level). All remaining columns after the 3rd column are variables known at baseline that influence tretmnet duration. Explanatory variables correspond to the vector of coefficients using to predict the location parameter for each distribution. ttd.da
x.mort Variables known at baseline that are used to adjust mortality with a log odds ratio. By default, only the baseline HAQ score is contained in the matrix. mort.logor
x.attr Treatment attributes related to the processes of care influencing utility. tx.attr.utility

For example, the mortality matrix, x.mort, is a matrix with a single column consisting of the baseline HAQ score for each patient.

head(input.dat$x.mort)
##          haq0
## [1,] 1.137859
## [2,] 2.460240
## [3,] 1.798122
## [4,] 0.429847
## [5,] 2.499273
## [6,] 1.542698