Usage
simulateJM(nsim, nsub, thetas, times, formulas, Data = NULL,
method = c("weibull-PH", "weibull-AFT", "piecewise-PH", "spline-PH"),
lag = 0, censoring = "uniform", max.FUtime = NULL, seed = NULL,
return.ranef = FALSE)
## S3 method for class 'jointModel':
simulate(object, nsim, seed = NULL, times = NULL,
Data = NULL, \dots)
Arguments
nsim
number of data sets to be simulated.
nsub
the number of subjects in each data set.
thetas
a list with the parameter values. This should be of the same structure as
the coefficients
component returned by jointModel()
.
times
a numeric vector denoting the time points at which longitudinal measurements
are planned to be taken.
formulas
a list with components: Yfixed
a formula for the fixed-effects part
of the linear mixed model, Yrandom
a formula for the random-effects part of the
linear mixed model, Tfixed
a formula for the baseline cova
Data
a data frame containing any covariates used in the formulas defined in the
formulas
argument.
method
a character string indicating from what type of survival submodel to simulate.
There are the same options as the ones provided by jointModel
. lag
a numeric value denoting a lagged effect; the same as the lag
argument of jointModel
. censoring
a character string or a numeric vector.
max.FUtime
a numeric value denoting the maximum follow-up time for the study. The default
is max(times) + 2 * IQR(times)
.
seed
an object specifying if and how the random number generator should
be initialized ('seeded'). It could be either NULL
or an integer that
will be used in a call to set.seed()
before simulating the response
vector
return.ranef
logical; if TRUE
, each component of the returned list has the attributed
"ranef"
that contains the random-effects values used in the simulation.
object
an object inheriting from class jointModel
.
...
additional arguments; currently none is used.