frailty_functions: Unified Survival, Density, Hazard, and Cumulative Hazard...

View source: R/functions.R

frailty_functionsR Documentation

Unified Survival, Density, Hazard, and Cumulative Hazard Combiner

Description

Evaluates unconditional survival function S(t), probability density function f(t), hazard function h(t), and cumulative hazard function H(t) for any specified combination of frailty distribution and baseline hazard.

Usage

frailty_functions(
  t,
  eta = 1,
  frailty = c("none", "gamma", "ig", "gl1", "gl2"),
  fpar = numeric(0),
  baseline = c("weibull", "gw"),
  bpar
)

Arguments

t

Positive numeric vector of time points.

eta

Linear predictor risk scores rho = exp(X %*% beta) (numeric vector of same length as t or scalar).

frailty

Character string specifying frailty family: "none", "gamma", "ig", "gl1", or "gl2".

fpar

Numeric vector of parameters for frailty distribution.

baseline

Character string specifying baseline hazard: "weibull" or "gw".

bpar

Numeric vector of parameters for baseline hazard.

Value

A named list containing:

S

Unconditional survival probabilities S(t).

f

Unconditional density values f(t).

h

Unconditional hazard values h(t).

H

Unconditional cumulative hazard values H(t).

References

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.

Examples

gf <- frailty_functions(1:5, eta = 1, frailty = "gl1", fpar = c(2.13, 1.53),
                        baseline = "gw", bpar = c(0.71, 2.13, 1.54))

MultiFrailty documentation built on Aug. 8, 2026, 1:07 a.m.