simulate_data: Simulate data

Description Usage Arguments Value Examples

View source: R/New_Simu_Gen_1.R

Description

Simulate data

Usage

1
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

1
2
3
#Simulate Data for 10 patients
Npat<- 10 
data<-simulate_data(Npat)

DDPGPSurv documentation built on May 2, 2019, 2:51 p.m.