| r_frailty | R Documentation |
Generates survival times and censoring indicators for shared frailty regression models across all 10 baseline-frailty combinations under eight distinct censoring mechanisms.
r_frailty(
n,
baseline = c("weibull", "gw"),
bpar,
frailty = c("none", "gamma", "ig", "gl1", "gl2"),
fpar = numeric(0),
x = matrix(nrow = n, ncol = 0),
beta = numeric(0),
cen_type = c("none", "right", "left", "interval", "type1", "type2", "progressive",
"progressive_type1"),
cen_rate = 0.2,
left_threshold = NULL,
int_width = NULL,
cen_time = NULL,
r_failures = NULL,
prog_scheme = NULL,
prog_times = NULL
)
n |
Number of observations to generate. |
baseline |
Baseline hazard distribution ( |
bpar |
Baseline parameter vector. |
frailty |
Frailty distribution ( |
fpar |
Frailty parameter vector. |
x |
Matrix of covariates (n x p). Default is 0-column matrix. |
beta |
Regression coefficient vector matching columns of |
cen_type |
Censoring mechanism: |
cen_rate |
Exponential rate for right-censoring time generation. Default is 0.2. |
left_threshold |
Threshold for left censoring. Default is 20th percentile. |
int_width |
Width of censoring window for interval censoring. Default is 20% of mean time. |
cen_time |
Fixed cutoff time for Type-I censoring. Default is 70th percentile. |
r_failures |
Target number of failures for Type-II censoring. Default is |
prog_scheme |
Vector of progressive removal counts for progressive censoring. |
prog_times |
Inspection time points for progressive Type-I censoring. |
A data frame containing generated time, time2 (for interval), status, and covariates.
Hougaard, P. (1984). Life table methods for heterogeneous populations: distributions of frailties. Biometrika, 71(1), 75-83.
Pandey, A., Hanagal, D. D., & Tyagi, S. (2022). Shared Frailty Models Based on Cancer Data. International Journal of Statistics and Reliability Engineering, 9(3), 461-474.
Pandey, A., & Tyagi, S. (2021). Comparison of Multiplicative Frailty Models Under Weibull Baseline Distribution. Lobachevskii Journal of Mathematics, 42(13), 3184-3195.
set.seed(123)
dat <- r_frailty(n = 100, baseline = "weibull", bpar = c(2, 1.5),
frailty = "gl1", fpar = c(1.2, 0.5),
cen_type = "right", cen_rate = 0.1)
head(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.