simdatmixcure: Simulation of survival data to fit mixture cure models.

View source: R/simdatmixcure.R

simdatmixcureR Documentation

Simulation of survival data to fit mixture cure models.

Description

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).

Usage

simdatmixcure(n, wscale, wshape, setting)

Arguments

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 setting = 1, the coefficients of the incidence part are beta0=0.70, beta1=-1.15 and beta2=0.95 and the coefficients of the latency part are gamma1=-0.10 and gamma2=0.25. If setting = 2, the coefficients of the incidence part are beta0=1.25, beta1=-0.75 and beta2=0.45 and the coefficients of the latency part are gamma1=-0.10 and gamma2=0.20.

Value

An object of class simixcure containing different objects of the simulated dataset. Details can be found by typing ?simixcure.object.

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr .

See Also

simdatmixcure.object

Examples

### 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


oswaldogressani/mixcurelps documentation built on Oct. 30, 2024, 10:45 p.m.