Skip to content

Survival analysis in health economic evaluation using Bayesian modelling and Hamiltonian Monte Carlo Contains a suite of functions to systematise the workflow involving survival analysis in health economic evaluation.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

giabaio/survHEhmc

Repository files navigation

survHEhmc

Survival analysis in health economic evaluation using HMC/stan

This is a module to complement the package survHE and expand its functionalities to run survival analysis in health economic evaluation from a Bayesian perspective, using Hamiltonian Monte Carlo (via the R package rstan). survHEhmc "depends" on the main installation of survHE. This means that you shouldn't use survHEhmc as a standalone package --- rather you use all the functions of survHE (to fit the models and the post-process the results); installing survHEhmc basically opens up a new option in the survHE function fit.models, which allow the use of INLA to run the underlying survival analysis.

Installation

survHEhmc can be installed from this GitHub repository using the package remotes:

remotes::install_github("giabaio/survHEhmc")

Alternatively, it is possible to install survHEinla from source with the following command.

install.packages(
  'survHEhmc', 
  repos = c('https://giabaio.r-universe.dev', 'https://cloud.r-project.org')
)

(NB: You can replace the CRAN mirror to any other, e.g. https://www.stats.bris.ac.uk/R/ --- see here).

Usage

Once survHEhmc is available, then you can refer to the whole manual/instructions for survHE. For instance, to fit a model using HMC, the following code would work:

# Load survHE
library(survHE)

# Loads an example dataset from 'flexsurv'
data(bc)

# Fits the same model using HMC
hmc = fit.models(formula=Surv(recyrs,censrec)~group,data=bc,
   distr="exp",method="hmc")
   
# Prints the results using the survHE method
print(hmc)

# Or visualises the results using the original package methods
print(hmc,original=TRUE)

# Plots the survival curves and estimates
plot(hmc)

Basically, the user doesn't even "see" that survHEhmc is being used...

About

Survival analysis in health economic evaluation using Bayesian modelling and Hamiltonian Monte Carlo Contains a suite of functions to systematise the workflow involving survival analysis in health economic evaluation.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published