Learn R Programming

jackknifeKME (version 1.2)

simdata: Generating survival data

Description

Generate survival data by keeping the second last largest subject as censored.

Usage

simdata(n, lambda)

Arguments

n
the sample size.
lambda
value of the parameter lambda for Uniform distribution. Different values of lambda are analytically computed to obtain specific censoring percentages. lambda takes values 7.53, 4.81, 3.48, 2.64, 2.04, 1.58, 1.20, 0.87, 0.55 for corresponding censoring percentages 10, 20, 30, 40, 50, 60, 70, 80, 90.

Value

Y
survival times censored or uncensored i.e. min(t, c)
delta
status
Cper
censoring percentage. Different censoring percentages are obtained for different values of lambda of censoring time distribution

Details

Data are generated always keeping the second last largest subject as censored i.e. delta_(n-1)=0. The survival times and the censoring times are generated using log-normal(1.1, 1) and Uniform(lambda, 2xlambda) distribution respectively. This type of data is required to compute the actual and modified jackknife estimates of Kaplan-Meier estimators and their bias. This data is used in Khan and Shaw (2015).

References

Khan and Shaw. (2015). Robust bias estimation for Kaplan-Meier Survival Estimator with Jackknifing. Journal of Statistical Theory and Practice, (published online; DOI:10.1080/15598608.2015.1062833). Also available in http://arxiv.org/abs/1312.4058.

See Also

jackknifeKME

Examples

Run this code
#For Cper = 30%.
data<-simdata(n = 100,lambda = 3.48)
data 

#For Cper = 50%.
data2<-simdata(n = 100,lambda = 2.04) 
data2

#For Cper = 80%.
data3<-simdata(n = 100,lambda = 0.87) 
data3

Run the code above in your browser using DataLab