generateSurvData | R Documentation |
Generate Survival Data which Can Be Analysed With the 'survival' Package
generateSurvData( nP, nT, alpha = 1, lambdaP, lambdaT, seed = NULL, nDigits = 0, startTime = 1, endTime = 180, orderTime = TRUE, competeRatio = 0 )
nP |
integer > 0 representing the number of of patients in the placebo group. |
nT |
integer > 0 representing the number of of patients in the treatment group. |
alpha |
numeric > 0, representing the shape parameter of the Weibull distribution. If alpha=1, then data are generated from the exponential, i.e., constant hazard. For alpha > 1 the hazard increases, if alpha < 1, the hazard decreases. |
lambdaP |
The (relative) hazard of the placebo group. |
lambdaT |
The (relative) hazard of the treatment group. |
seed |
A seed number. |
nDigits |
numeric, the number of digits to round of the random time to |
startTime |
numeric, adds this to the random times. Default 1, so the startTime is not 0, which
is the start time of |
endTime |
The endtime of the experiment. |
orderTime |
logical, if |
competeRatio |
The ratio of the data that is due to competing risk. |
A data set with time, status and group.
generateSurvData(800, 800, alpha=1, lambdaP=0.008, lambdaT=0.008/2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.