simjm: Simulate data from a joint model of multiple continuous...

Description Usage Arguments Details Value References Examples

Description

simjm simulates data from a Cox proportional hazards or semi-parametric additive model with two time-fixed covariates (Z1 and Z2) and three time-dependent covariates (Yij_1,Yij_2,Yij_3). The user can specify various characteristics of these distributions.

Usage

1
2
simjm(n = 200, surv_model = "Cox", marker_model = "RE", MErr = "High",
  Miss = "Low", effects = "Weak", corr = "Low")

Arguments

n

Size of dataset to be generated

surv_model

Model for the time-to-event. Options are "Cox" for Cox proportional hazard model and "Add" for semi-parametric additive hazards model.

marker_model

Model for the multiple markers. Options are "RE" for the correlated random effects model and "PN" for the product normal model.

MErr

Degree of measurement error in the multiple markers. Options are "Low", "Mod" and "High".

Miss

Degree of missing at-risk measurements. Options are "None", "Low" and "High".

effects

Strength of effects of the markers on the hazard. Options are "Null", "Weak" and "Strong".

corr

Degree of marginal pairwise correlations between the markers. Options are "Low", "Mod" and "High".

Details

The function can be used to generate data from any of the scenarios considered in the the main simulation settings of Moreno-Betancur et al. (2017). See that reference for details.

Value

A data.frame as required by survtd. That is, in the long format, with one row per individual and per visit time at which any of the time-dependent covariates were measured, with the corresponding measurements. The dataset also includes a variable that uniquely identifies observations from the same individual; a variable that indicates the timing of each measurement visit; and the fixed variables (time-to-event, event indicator, time-fixed covariates) which are constant across rows of the same individual. The final columns of the dataset (from Xij_1 onwards) are to recover the true values of the markers as per the data generation model for use with function simjm_benchmark. Specifically, the variables in the dataset are:

ID

Unique identifier of observations from the same individual.

tt

Time to event, possibly right-censored.

event

Indicator of event, with event=1 if an event occurred at tt and event=0 if the individual is censored.

Z1

Time-fixed binary covariate.

Z2

Time-fixed continuous covariate.

tj

Timing of the measurement visit.

Yij_1

Measured value of marker 1 at time tj

Yij_2

Measured value of marker 2 at time tj

Yij_3

Measured value of marker 3 at time tj

Xij_1

True value of marker 1 at time tj

Xij_2

True value of marker 2 at time tj

Xij_3

True value of marker 3 at time tj

fixed_1

Time-fixed part of the linear predictor of the linear mixed model from which Yij_1 is generated.

tim_1

Time-dependent part of the linear predictor of the linear mixed model from which Yij_1 is generated, excluding terms for other markers in the case of product-normal model.

fixed_2

Time-fixed part of the linear predictor of the linear mixed model from which Yij_2 is generated.

tim_2

Time-dependent part of the linear predictor of the linear mixed model from which Yij_2 is generated, excluding terms for other markers in the case of product-normal model.

fixed_3

Time-fixed part of the linear predictor of the linear mixed model from which Yij_3 is generated.

tim_3

Time-dependent part of the linear predictor of the linear mixed model from which Yij_3 is generated, excluding terms for other markers in the case of product-normal model.

References

Moreno-Betancur M, Carlin JB, Brilleman SL, Tanamas S, Peeters A, Wolfe R (2017). Survival analysis with time-dependent covariates subject to missing data or measurement error: Multiple Imputation for Joint Modeling (MIJM). Biostatistics [Epub ahead of print 12 Oct 2017].

Examples

1
2
3
4
5
6
7
8
9
  dat<-simjm(n=200,surv_model="Cox",marker_model="PN",
             MErr="High",Miss="None",effects="Weak",corr="Low")

  head(dat)

  dat<-simjm(n=200,surv_model="Add",marker_model="RE",
            MErr="Low",Miss="High",effects="Strong",corr="Mod")

  head(dat)

moreno-betancur/survtd documentation built on May 20, 2019, 5:07 p.m.