Shared Frailty Regression Models with Inverse Gaussian, Generalized Lindley, and Gamma Frailty Distributions

Implements shared frailty regression models for survival data under eight censoring mechanisms: exact, right censoring (Kalbfleisch and Prentice, 2002), left censoring, interval censoring (Sun, 2006), progressive Type I censoring, and progressive Type II censoring (Balakrishnan and Aggarwala, 2000 ). Combines four frailty distributions -- Gamma (Clayton, 1978), Inverse Gaussian (Hougaard, 1984), and two variants of the Generalized Lindley (GL) distribution: GL Type 1, a two-component gamma mixture with distribution-specific scale/shape linkage (Pandey, Hanagal, and Tyagi, 2022), and GL Type 2, a two-component gamma mixture with a common rate parameter (Pandey and Tyagi, 2021 ) -- with two baseline hazard distributions: the two-parameter Weibull distribution (Weibull, 1951) and the three-parameter Generalized (Exponentiated) Weibull distribution (Mudholkar and Srivastava, 1993 ). A no-frailty baseline-only model is also supported for nested model comparison. Maximum likelihood estimation is conducted using Newton-Raphson and Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithms via the 'maxLik' package (Henningsen and Toomet, 2011 ). Provides standard errors, confidence intervals, hypothesis tests, Akaike Information Criterion (AIC, Akaike, 1974 ), Bayesian Information Criterion (BIC, Schwarz, 1978 ), corrected Akaike Information Criterion (AICc, Hurvich and Tsai, 1989), Hannan-Quinn Information Criterion (HQIC, Hannan and Quinn, 1979), a bootstrap approximation of the Widely Applicable Information Criterion (WAIC, Watanabe, 2010), k-fold cross-validation, frailty variance estimation, survival, hazard, median, risk, and marginal predictions, Cox-Snell (Cox and Snell, 1968), martingale (Barlow and Prentice, 1988), and deviance residuals with a Kolmogorov-Smirnov goodness-of-fit test, influence diagnostics (leverage, Cook's distance, difference in fits (DFFITS), difference in betas (DFBETAS); Belsley, Kuh, and Welsch, 1980), random data generation under all eight censoring mechanisms, a Monte Carlo simulation-study function, and a diagnostic and survival plotting suite.


MultiFrailty: Shared Frailty Regression Models in R

License: GPL v3

MultiFrailty is a comprehensive R package designed for shared frailty survival regression analysis. It unifies five frailty distributions (Inverse Gaussian, Generalized Lindley Type 1, Generalized Lindley Type 2, Gamma, and No-Frailty) across two flexible baseline hazards (2-parameter Weibull and 3-parameter Generalized Weibull).

Key Features

  • 10 Model Combinations: Supports all combinations of 5 frailty families × 2 baseline hazards.
  • Robust Estimation: Frequentist Maximum Likelihood Estimation via maxLik / optim with log-domain numerical stability and analytical Laplace derivatives.
  • Formula Interface: Seamless survival::Surv(time, status) ~ x1 + x2 interface.
  • 8 Censoring Schemes: Data generation under exact, right, left, interval, Type-I, Type-II, progressive, and progressive Type-I censoring.
  • Model Comparison: AIC, BIC, AICc, HQIC, bootstrapped WAIC, and k-fold cross-validation.
  • Diagnostics & Plots: Residual analysis (Cox-Snell, Martingale, Deviance, K-S test), influence diagnostics (Leverage, Cook's D, DFBETAS, DFFITS), and frailty density overlay plots.

Installation

# Install locally
install.packages("MultiFrailty", repos = NULL, type = "source")

Quick Start Example

library(MultiFrailty)

# Generate synthetic survival data with GL Type 1 frailty & Weibull baseline
set.seed(123)
dat <- r_frailty(n = 100, baseline = "weibull", bpar = c(2, 1.5),
                 frailty = "gl1", fpar = c(1.2, 0.5),
                 x = matrix(rnorm(100), ncol = 1), beta = 0.5,
                 cen_type = "right", cen_rate = 0.1)

# Fit Shared Frailty Model via Formula Interface
fit <- multifrailty(Surv(time, status) ~ X1, data = dat,
                    baseline = "weibull", frailty = "gl1")

# Print Summary & Diagnostic Plots
summary(fit)
plot_all(fit)

References

  1. 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.
  2. Pandey, A., & Tyagi, S. (2021). Comparison of Multiplicative Frailty Models Under Weibull Baseline Distribution. Lobachevskii Journal of Mathematics, 42(13), 3184–3195.
  3. Hougaard, P. (1984). Life table methods for heterogeneous populations: distributions of frailties. Biometrika, 71(1), 75–83.
  4. Mudholkar, G. S., & Srivastava, D. K. (1993). Exponentiated Weibull family for analyzing bathtub failure-rate data. IEEE Transactions on Reliability, 42(2), 299–302.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("MultiFrailty")

0.1.0 by Shikhar Tyagi, 2 months ago


Browse source code at https://github.com/cran/MultiFrailty


Authors: Shikhar Tyagi [aut, cre] (ORCID: , Arvind Pandey [aut] , Bhupendra Singh [aut] , Vrijesh Tripathi [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports survival, maxLik, numDeriv, stats, graphics, grDevices, utils

Suggests testthat, knitr, rmarkdown


See at CRAN