dataCox generaters random survivaldata from Weibull
distribution (with parameters
rho for given input
x data, model coefficients
beta and censoring rate for censoring
that comes from exponential distribution with parameter
Number of observations to generate.
lambda parameter for Weibull distribution.
rho parameter for Weibull distribution.
A data.frame with an input data to generate the survival times for.
True model coefficients.
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
data.frame containing columns:
id an integer.
time survival times.
status observation status (event occured (1) or not (0)).
data.frame with an input data to generate the survival times for.
Generating survival times to simulate Cox proportional hazards models, 2005 by Ralf Bender, Thomas Augustin, Maria Blettner.
1 2 3 4 5 6
Loading required package: survival
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.