Description Usage Arguments Details Value References Examples
Function dataCox
generaters random survivaldata from Weibull
distribution (with parameters lambda
and rho
for given input
x
data, model coefficients beta
and censoring rate for censoring
that comes from exponential distribution with parameter cens.rate
.
1 |
n |
Number of observations to generate. |
lambda |
lambda parameter for Weibull distribution. |
rho |
rho parameter for Weibull distribution. |
x |
A data.frame with an input data to generate the survival times for. |
beta |
True model coefficients. |
cens.rate |
Parameter for exponential distribution, which is responsible for censoring. |
For each observation true survival time is generated and a censroing time. If censoring time is less then survival time, then the survival time
is returned and a status of observations is set to 0
which means the
observation had censored time. If the survival time is less than censoring
time, then for this observation the true survival time is returned and the
status of this observation is set to 1
which means that the event has
been noticed.
A data.frame
containing columns:
id
an integer.
time
survival times.
status
observation status (event occured (1) or not (0)).
x
a data.frame
with an input data to generate the survival times for.
http://onlinelibrary.wiley.com/doi/10.1002/sim.2059/abstract
Generating survival times to simulate Cox proportional hazards models
, 2005 by Ralf Bender, Thomas Augustin, Maria Blettner.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.