| fit_frailty | R Documentation |
Fits shared frailty regression models using Maximum Likelihood Estimation (MLE) across all 10 baseline-frailty combinations with robust optimizer fallbacks.
fit_frailty(
time,
status,
x = matrix(nrow = length(time), ncol = 0),
baseline = c("weibull", "gw"),
frailty = c("none", "gamma", "ig", "gl1", "gl2"),
time2 = NULL,
prog_cen = NULL,
init = NULL,
method = "NR",
...
)
time |
Primary survival/censoring time vector. |
status |
Event indicator vector (0 = right-censored, 1 = event, 2 = left-censored, 3 = interval-censored). |
x |
Design matrix of covariates (n x p). Default is a 0-column matrix. |
baseline |
Character string for baseline hazard: |
frailty |
Character string for frailty family: |
time2 |
Vector of upper interval bounds when |
prog_cen |
Vector of progressive censoring counts. Default is NULL. |
init |
Vector of initial values on the estimation scale. Default is NULL (automatic). |
method |
Optimization method passed to |
... |
Additional arguments passed to optimization algorithms. |
An object of class "multifrailty_fit" containing parameter estimates, standard errors,
information criteria, variance-covariance matrix, and diagnostic statistics.
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 = "gamma", fpar = c(0.8),
x = matrix(rnorm(100), ncol = 1), beta = 0.5)
fit <- fit_frailty(time = dat$time, status = dat$status, x = as.matrix(dat[, "X1", drop=FALSE]),
baseline = "weibull", frailty = "gamma")
print(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.