survregVB.fit: Variational Bayesian Analysis of Survival Data Using a...

View source: R/survregVB.fit.R

survregVB.fitR Documentation

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

Description

Called by survregVB to do the actual parameter and ELBO computations. This routine does no checking that the arguments are the proper length or type.

Usage

survregVB.fit(
  Y,
  X,
  alpha_0,
  omega_0,
  mu_0,
  v_0,
  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.

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 proposed in the paper "Variational Bayesian analysis of survival data using a log-logistic accelerated failure time model."

For right-censored survival time T_i of the i_{th} subject in a sample, i=1,...,n, the log-logistic AFT model is specified as follows:

\log(T_i)=X_i^T\beta+bz_i, where

  • X_i 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_{i1},...,x_{i(p-1)})^T),

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

  • z_i 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). "Variational Bayesian analysis of survival data using a log-logistic accelerated failure time model." Statistics and Computing, 34(2). https://doi.org/10.1007/s11222-023-10365-6

See Also

survregVB

Examples

fit <- survregVB.fit(
  Y = survival::Surv(simulation_nofrailty$Time, simulation_nofrailty$delta),
  X = matrix(c(rep(1, 300), simulation_nofrailty$x1, simulation_nofrailty$x2), nrow = 300),
  alpha_0 = 11,
  omega_0 = 10,
  mu_0 = c(0, 0, 0),
  v_0 = 1
)


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