Learn R Programming

FastJM (version 1.7.0)

simJMWSVdata: Simulate joint model data with heterogeneous within-subject variability

Description

Simulates longitudinal biomarker data with heterogeneous within-subject variability and associated time-to-event data. The survival outcome may be generated either as a single-failure time-to-event outcome or as competing risks data with two failure types.

Usage

simJMWSVdata(
  seed = 100,
  N = 200,
  increment = 0.7,
  beta = c(5, 1.5, 2, 1, 2),
  tau = c(0.5, 0.5, -0.2, 0.2, 0.05),
  gamma1 = c(1, 0.5, 0.5),
  gamma2 = c(-0.5, 0.5, 0.25),
  alpha1 = c(1, 0.7),
  alpha2 = c(-1, -0.5),
  vee1 = 0.5,
  vee2 = -0.5,
  lambda1 = 0.05,
  lambda2 = 0.025,
  CL = 5,
  CU = 10,
  covbw = diag(rep(1, 3)),
  CR = TRUE
)

Value

A list with the following components:

ydatah

A long-format data frame containing the simulated longitudinal biomarker measurements.

cdatah

A data frame containing the simulated event-time data.

Arguments

seed

Integer random seed used for data generation. Default is 100.

N

Integer specifying the sample size. Default is 200.

increment

Numeric value specifying the increment of visit times for longitudinal measurements. Default is 0.7.

beta

Numeric vector of true fixed-effect parameters for the longitudinal mean sub-model.

tau

Numeric vector of true parameters for the within-subject variability sub-model.

gamma1

Numeric vector of true fixed-effect parameters in the cause-specific hazard sub-model for failure type 1.

gamma2

Numeric vector of true fixed-effect parameters in the cause-specific hazard sub-model for failure type 2.

alpha1

Numeric vector of association parameters of individual mean linking the longitudinal process to the cause-specific hazard for failure type 1.

alpha2

Numeric vector of association parameters individual mean linking the longitudinal process to the cause-specific hazard for failure type 2.

vee1

Numeric association parameter of within-subject variability linking the longitudinal process to the cause-specific hazard for failure type 1.

vee2

Numeric association parameter of within-subject variability linking the longitudinal process to the cause-specific hazard for failure type 2.

lambda1

Baseline hazard rate for failure type 1. An exponential baseline hazard with rate lambda1 is assumed.

lambda2

Baseline hazard rate for failure type 2. An exponential baseline hazard with rate lambda2 is assumed.

CL

Lower bound of the uniform distribution used to generate censoring times.

CU

Upper bound of the uniform distribution used to generate censoring times.

covbw

Variance-covariance matrix for the random effects in the longitudinal mean and within-subject variability sub-models.

CR

Logical; if TRUE, competing risks data with two failure types are simulated. If FALSE, a single-failure time-to-event outcome is generated. Default is TRUE.

Details

Simulate joint model data with heterogeneous within-subject variability