survregVB {survregVB} | R Documentation |
Variational Bayesian Analysis of Survival Data Using a Log-Logistic Accelerated Failure Time Model
Description
Applies a mean-field Variational Bayes (VB) algorithm to infer the parameters of an accelerated failure time (AFT) survival model with right-censored survival times following a log-logistic distribution.
Usage
survregVB(
formula,
data,
alpha_0,
omega_0,
mu_0,
v_0,
lambda_0,
eta_0,
na.action,
cluster,
max_iteration = 100,
threshold = 1e-04
)
Arguments
formula |
A formula object, with the response on the left of a |
data |
A |
alpha_0 |
The shape hyperparameter |
omega_0 |
The shape hyperparameter |
mu_0 |
Hyperparameter |
v_0 |
The precision (inverse variance) hyperparameter |
lambda_0 |
The shape hyperparameter |
eta_0 |
The scale hyperparameter |
na.action |
A missing-data filter function, applied to the
|
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
The goal of survregVB
is to maximize the evidence lower bound
(ELBO) to approximate posterior distributions of the AFT model parameters
using the VB algorithms with and without shared frailty proposed in Xian
et al. (2024) doi:10.1007/s11222-023-10365-6 and
doi:10.48550/ARXIV.2408.00177 respectively.
Value
An object of class survregVB
.
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
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
Examples
# Data frame containing survival data
fit <- survregVB(
formula = survival::Surv(time, infect) ~ trt + fev,
data = dnase,
alpha_0 = 501,
omega_0 = 500,
mu_0 = c(4.4, 0.25, 0.04),
v_0 = 1,
max_iteration = 100,
threshold = 0.0005
)
summary(fit)
# Call the survregVB function with shared frailty
fit2 <- survregVB(
formula = survival::Surv(Time.15, delta.15) ~ x1 + x2,
data = simulation_frailty,
alpha_0 = 3,
omega_0 = 2,
mu_0 = c(0, 0, 0),
v_0 = 0.1,
lambda_0 = 3,
eta_0 = 2,
cluster = cluster,
max_iteration = 100,
threshold = 0.01
)
summary(fit2)