Learn R Programming

DDPGPSurv (version 1.0)

simulate_data: Simulate data

Description

Simulate data

Usage

simulate_data(Npat, method = 1, mixture = 1, censor = 0)

Arguments

Npat

A positive integer indicating the number of patients to be simulated.

method

A binary value (either 0 or 1). If method is set to 0, the survival times are simulated from a Weibull distribution. If method is set to 1, the survival times are simulated from a Lognormal distribution. Default value is 1.

mixture

A binary value (either 0 or 1). If method is set to 0, the survival times are simulated from a mixture of two distributions. If method is set to 1, the survival times are simulated from single distribution. Default value is 1.

censor

A binary value (either 0 or 1). If censor is set to 1, survival times of patients will be censored (at roughly 25 If censor is set to 0, the survival times of patients will not be censored. Default value is 0.

Value

Returns a list composed of the patients' generated attributes. The covariates are Age, AUC, and CR.

Examples

Run this code
# NOT RUN {
#Simulate Data for 10 patients
Npat<- 10 
data<-simulate_data(Npat)

# }

Run the code above in your browser using DataLab