MyNixOS website logo
Description

Variational Bayesian Analysis of Survival Data.

Implements Bayesian inference in accelerated failure time (AFT) models for right-censored survival times assuming a log-logistic distribution. Details of the variational Bayes algorithms, with and without shared frailty, are described in Xian et al. (2024) <doi:10.1007/s11222-023-10365-6> and Xian et al. (2024) <doi:10.48550/arXiv.2408.00177>, respectively.

survregVB

Overview

survregVB is an R package that provides Bayesian inference for log-logistic accelerated failure time (AFT) models used in survival analysis as a faster alternative to Markov chain Monte Carlo (MCMC) methods. The details of the Variational Bayes algorithms with and without shared frailty can be found in Xian et al., (2024a) and Xian et al., (2024b) respectively.

Installation

To install survregVB, use the following command:

remotes::install_github("https://github.com/chengqianxian/survregVB")

Usage

Loading the Package

library(survregVB)
library(survival) 

Fitting a Basic Model

# Example using dataset included in the package
data(dnase)

# Fit a survival model
fit <- survregVB(formula = 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)

# Print summary
summary(fit)

Fitting a Model with Frailty

# Using dataset included in the package
data(simulation_frailty)

# Fit a survival model with shared frailty 
fit_frailty <- survregVB(formula = 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)

# Print summary
summary(fit_frailty)

R-CMD-check

Metadata

Version

0.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows