Provides tools to simulate and analyze survival data with interval-, left-, right-, and uncensored observations under common parametric distributions, including "Weibull", "Exponential", "Log-Normal", "Log-Logistic", "Gamma", "Gompertz", "Normal", "Logistic", and "EMV". The package supports both direct maximum likelihood estimation and imputation-based methods, making it suitable for methodological research, simulation benchmarking, and teaching. A web-based companion app is also available for demonstration purposes.
The simIC package provides tools for simulating and analyzing interval-censored survival data, including left-, right-, and uncensored observations, using a variety of parametric distributions. It is useful for teaching, model development, and method evaluation in survival analysis.
Supports commonly used parametric distributions:
Simulates survival data with interval, left, right, and uncensored observations using user-defined visit schedules (start_time, end_time) and an optional tolerance (uncensored_tol) for detecting exact event times.
Provides two estimation functions:
mle_int()
F(Ri) - F(Li)F(Ri)1 - F(Li)f(ti)mle_imp()
(Li, Ri) using midpoint, random, medians, or survival-based methodsF(Ri)1 - F(Li)f(ti)You can install the development version of simIC from GitHub:
install.packages("remotes")
remotes::install_github("jayarasan/simIC")
library(simIC)
๐งช Simulate Survival Data
# Interval-censored data only (no visit window)
data <- simIC(n = 100, dist = "weibull", shape = 1.5, scale = 5, width = 2)
# Left-, right-, and uncensored data using a follow-up window and tolerance
data <- simIC(n = 100, dist = "weibull", shape = 1.5, scale = 5,
width = 2, start_time = 0, end_time = 10, uncensored_tol = 0.1)
๐ Model Fitting Examples
# Direct MLE for interval-censored data
fit_int <- mle_int(data$left, data$right, dist = "weibull")
print(fit_int$estimates)
# Imputation-based MLE (midpoint)
fit_imp <- mle_imp(data$left, data$right, dist = "weibull", impute = "midpoint")
print(fit_imp$estimates)