Learn R Programming

FastJM (version 1.7.0)

simJMdata: Simulate single-biomarker joint model data

Description

Simulates single longitudinal biomarker data 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

simJMdata(
  seed = 100,
  N = 200,
  increment = 0.7,
  beta = c(5, 1.5, 2, 1, 2),
  sigma2 = 1,
  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),
  lambda1 = 0.05,
  lambda2 = 0.025,
  CL = 5,
  CU = 10,
  covb = diag(rep(1, 2)),
  CR = TRUE
)

Value

A list with the following components:

ydata

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

cdata

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 sub-model.

sigma2

Scalar parameter of error variance for the longitudinal 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.

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.

covb

Variance-covariance matrix for the random effects in the longitudinal sub-model.

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 single-biomarker joint model data