survregVB.frailty.fit: Variational Bayesian Analysis of Correlated Survival Data...

View source: R/survregVB.frailty.fit.R

survregVB.frailty.fitR Documentation

Variational Bayesian Analysis of Correlated Survival Data Using a Log-Logistic Accelerated Failure Time Model

Description

Called by survregVB to do the actual parameter and ELBO computations for correlated survival data with shared frailty (a random intercept). This routine does no checking that the arguments are the proper length or type.

Usage

survregVB.frailty.fit(
  Y,
  X,
  alpha_0,
  omega_0,
  mu_0,
  v_0,
  lambda_0,
  eta_0,
  cluster,
  max_iteration = 100,
  threshold = 1e-04
)

Arguments

Y

A Surv object containing 2 columns: time and event.

X

A design matrix including covariates with first column of ones to represent the intercept.

alpha_0

The shape hyperparameter \alpha_0 of the prior distribution of the scale parameter, b.

omega_0

The shape hyperparameter \omega_0 of the prior distribution of the scale parameter, b.

mu_0

Hyperparameter \mu_0, a vector of means, of the prior distribution of the vector of coefficients, \beta.

v_0

The precision (inverse variance) hyperparameter v_0, of the prior distribution of the vector of coefficients, \beta.

lambda_0

The shape hyperparameter \lambda_0 of the prior distribution of the frailty variance, \sigma_\gamma^2.

eta_0

The scale hyperparameter \eta_0 of the prior distribution of the frailty variance, \sigma_\gamma^2.

cluster

An optional variable which clusters the observations to introduce shared frailty for correlated survival data.

max_iteration

The maximum number of iterations for the variational inference optimization. If reached, iteration stops. (Default:100)

threshold

The convergence threshold for the evidence based lower bound (ELBO) optimization. If the difference between the current and previous ELBO's is smaller than this threshold, iteration stops. (Default:0.0001)

Details

Implements the Variational Bayes algorithm with random intercepts proposed in the paper "Fast variational bayesian inference for correlated survival data: An application to invasive mechanical ventilation duration analysis".

For right-censored survival time T_{ij} of the j_{th} subject from the i_{th} cluster in the sample, in a sample, i=1,...,K and j=1,...,n_i, the shared-frailty log-logistic AFT model is specified as follows:

\log(T_{ij})=\gamma_i+X_{ij}^T\beta+b\epsilon_{ij}, where

  • X_{ij} is a column vector of length p, p\ge2 containing p-1 covariates and a constant one to incorporate the intercept (i.e., X_i=(1,x_{ij1},...,x_{ij(p-1)})^T),

  • \beta is the corresponding vector of coefficients for the fixed effects,

  • \gamma_i is a random intercept for the i_{th} cluster,

  • \epsilon_{ij} is a random variable following a standard logistic distribution, and

  • b is a scale parameter.

Value

A list containing results of the fit.

References

Xian, C., Souza, C. P. E. de, He, W., Rodrigues, F. F., & Tian, R. (2024). "Fast variational bayesian inference for correlated survival data: An application to invasive mechanical ventilation duration analysis." https://doi.org/10.48550/ARXIV.2408.00177

See Also

survregVB

Examples

fit <- survregVB.frailty.fit(
  X = matrix(c(rep(1, 75), simulation_frailty$x1, simulation_frailty$x2), nrow = 75),
  Y = survival::Surv(simulation_frailty$Time, simulation_frailty$delta),
  alpha_0 = 3,
  omega_0 = 2,
  mu_0 = c(0, 0, 0),
  v_0 = 0.1,
  lambda_0 = 3,
  eta_0 = 2,
  cluster = simulation_frailty$cluster
)


survregVB documentation built on June 8, 2025, 1:46 p.m.