Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

❗ This is a read-only mirror of the CRAN R package repository. MultiFrailty — Shared Frailty Regression Models with Inverse Gaussian, Generalized Lindley, and Gamma Frailty Distributions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages