Usage
genSurvDf(b = 2L, f = 2L, c = 1L, n = 100L, pb = 0.5,
nlf = 3L, rc = 0.8, pe = 0.5, t0 = 1L, tMax = 100L,
asFactor = TRUE, model = TRUE, timelim = 5)
genSurvDt(b = 2L, f = 2L, c = 1L, n = 100L, pb = 0.5,
nlf = 3L, rc = 0.8, pe = 0.5, t0 = 1L, tMax = 100L,
asFactor = TRUE, model = TRUE, timelim = 5)Arguments
b
binomial predictors, the number of
predictors which are binary, i.e. limited to $0$ or
$1$
f
factors, the number of predictors which
are factors
c
continuous predictors, the number of
predictors which are continuous
n
number of observations (rows) in the data
nlf
the number of levels in a factor
pb
probability for binomnial predictors: the
probability of binomial predictors being $=1$ e.g. if
pb=0.3, $30%$ will be $1$s, $70%$
will be $0$s
rc
ratio for continuous variables: the ratio
of levels of continuous variables to the total number of
observations n e.g. if rc=0.8 and
n=100, it will be in the range $1-80$
pe
probability of event the probability of
events (typically death/failure) occurring, i.e.
$P(e=1)$. e.g. if pe=0.6, $60%$ will be
$1$s, $40%$ will be $0$s
asFactor
if asFactor=TRUE (the default),
predictors given as factors will be converted to
factors in the data frame before the model is fit
timelim
function will timeout after timelim
secs. This is present to prevent duplication of rows.
model
If model=TRUE (the default) will also
return a model fitted with survival::coxph.