View source: R/simdatmixcure.R
simdatmixcure | R Documentation |
This routines simulates survival data with a cure fraction. The data is simulated according to a mixture cure model with a logistic link for the incidence part of the model. The incidence part includes two covariates following a standard normal and a Bernoulli distribution with success probability equal to 0.5. The latency part assumes a Weibull-Cox model with two covariates (a standard normal variate and a Bernoulli variate with success probability equal to 0.4).
simdatmixcure(n, wscale, wshape, setting)
n |
Sample size. |
wscale |
The positive scale parameter of the Weibull distribution used to generate the survival times of the uncured subjects. |
wshape |
The positive shape parameter of the Weibull distribution used to generate the survival times of the uncured subjects. |
setting |
The setting under which survival times will be generated. If
|
An object of class simixcure
containing different objects of the
simulated dataset. Details can be found by typing ?simixcure.object.
Oswaldo Gressani oswaldo_gressani@hotmail.fr .
simdatmixcure.object
### Simulate a sample of size n=300 under Scenario 1.
set.seed(4408)
simdat <- simdatmixcure(n = 300, wshape = 1.45, wscale = 0.25, setting = 1)
plot(simdat) # Plot the baseline survival and Kaplan-Meier curve
simdat$info # Print information on Cure and Censoring levels
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.