Creating left and interval censored survival data for model comparison

142 views Asked by At

I am currently trying to generate 3 datasets for survival analysis. I would like these datasets to consist have multiple covariates and differ only in the type of censoring, I wish 1 to be right-censored, 1 to be left-censored and 1 be interval-censored. I wish to fit a CoxPH model, Accelerated Failure Time model and Aalen's Additive model to compare the results between these types of datasets.

I have applied code using "survsim" to simulate the following - A cohort with 10000 subjects, with a maximum follow-up time of 5000 days and two covariates, following a Bernoulli and uniform distribution respectively, and corresponding beta of -0.4 for the first covariate and a corresponding beta of 0 for the second covariate. Notice that the time to censorship is assumed to follow a Weibull distribution, as no other distribution is stated.

sim.data <- simple.surv.sim(n=10000, foltime=5000, dist.ev=c('llogistic'),
                            anc.ev=c(0.69978200185280),beta0.ev=c(5.84298525742252),,anc.cens=1.17783687569519,
beta0.cens=7.39773677281100,z=list(c("unif", 0.8, 1.2)), beta=list(c(-0.4),c(0)), x=list(c("bern", 0.5), c("unif", 0.7, 1.3)))

summary(sim.data)

However, this produces only right-censored data. If anyone has any ideas on how to best achieve this or recommends any parameter changes for my intended use, it would be much appreciated. I am also open to using other packages and even python.

0

There are 0 answers