The function simGSC()
generates simulated recurrent event data from either
a Cox-type model, an accelerated mean model, an accelerated rate model, or a generalized scale-change model.
simGSC(
n,
summary = FALSE,
para,
xmat,
censoring,
frailty,
tau,
origin,
Lam0,
Haz0
)
number of observation.
a logical value indicating whether a brief data summary will be printed.
a list of numerical vectors for the regression coefficients
in the joint scale-change model.
The names of the list elements are alpha
, beta
, eta
, and
theta
, correspond to reReg
.
an optional matrix specifying the design matrix.
a numeric variable specifying the censoring times for each of the
a numeric variable specifying the frailty variable.
a numeric value specifying the maximum observation time.
a numeric value specifying the time origin.
is an optional function that specifies the baseline cumulative rate function.
When left-unspecified, the recurrent events are generated using the
baseline rate function of
is an optional function that specifies the baseline hazard function.
When left-unspecified, the recurrent events are generated using the baseline hazard function
The function simGSC()
generates simulated recurrent event data over
the interval
Under the default settings, the simGSC()
function assumes xmat
argument is not specified, the simGSC()
function
assumes xmat
, the censoring time $C$ is generated from
an independent uniform distribution in frailty
argument is not specified, the frailty variable tau
and origin
are 60 and 0, respectively.
When arguments Lam0
and Haz0
are left unspecified,
the simGSC()
function uses Lam0 = function(x) 2 * log(1 + x)
and Haz0 = function(x) log(1 + x) / 5
.
Overall, the default specifications generate the recurrent events and the terminal events
from the model:
# NOT RUN {
set.seed(123)
simGSC(100, summary = TRUE)
# }
Run the code above in your browser using DataLab