simData(n = 100, ntms = 5, beta = rbind(c(1, 1, 1, 1), c(1, 1, 1, 1)),
gamma.x = c(1, 1), gamma.y = c(0.5, -1), sigma2 = c(1, 1), D = NULL,
model = "intslope", theta0 = -3, theta1 = 1, censoring = TRUE,
censlam = exp(-3), truncation = TRUE, trunctime = (ntms - 1) + 0.1)
dim = c(K,4)
specifying the coefficients of
the fixed effects. The order in each row is intercept, time, a continuous
covariate, and a binary covariate.length = 2
specifying the coefficients for
the time-to-event baseline covariates, in the order of a continuous
covariate and a binary covariate.length = K
specifying the latent
association parameters for each longitudinal outcome.length = K
specifying the residual standard
errors.model = 'int'
, the matrix has dimension dim = c(K,
K)
, else if model = 'intslope'
, the matrix has dimension dim
= c(2K, 2K)
. If D = NULL
(default), an identity matrix is assumed.joint
function. See Details for choices.TRUE
, includes an independent censoring
time.censoring = TRUE
.TRUE
, adds a truncation time for a
maximum event time.truncation = TRUE
.data.frame
s: one recording the requisite
longitudinal outcomes data, and one recording the time-to-event data.simData
simulates data from a joint model,
similar to that performed in Henderson et al. (2000). It works by first
simulating multivariate longitudinal data for all possible follow-up times
using random draws for the multivariate Gaussian random effects and
residual error terms. Data can be simulated assuming either
random-intercepts only in each of the longitudinal sub-models, or
random-intercepts and random-slopes. Currently, all models must have the
same structure. The failure times are simulated from proportional hazards
time-to-event models using the following methodologies: model="int"
model="intslope"
beta <- rbind(c(0.5, 2, 1, 1),
c(2, 2, -0.5, -1))
D <- diag(4)
D[1, 1] <- D[3, 3] <- 0.5
D[1, 2] <- D[2, 1] <- D[3, 4] <- D[4, 3] <- 0.1
D[1, 3] <- D[3, 1] <- 0.01
sim <- simData(n = 250, beta = beta, D = D, sigma2 = c(0.25, 0.25),
censlam = exp(-0.2), gamma.y = c(-.2, 1), ntms = 8)
Run the code above in your browser using DataLab