| generateSurvData | R Documentation |
survival PackageGenerate 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.
Grünwald, P. D., de Heide, R., & Koolen, W. (2024). Safe testing. Journal of the Royal Statistical Society. Series B (Methodological), 86(5), 1091-1128. (With discussions), https://doi.org/10.1093/jrsssb/qkae011. ter Schure, J., Pérez-Ortiz, M. F., Ly, A., & Grünwald, P. D. (2024). The Safe Logrank Test: Error control under continuous monitoring with unlimited horizon. The New England Journal of Statistics in Data Science, 2(2), 190-214, https://doi.org/10.51387/24-NEJSDS65.
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.