Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.68 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.68 KB

survHEinla

Survival analysis in health economic evaluation using INLA

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 Integrated Nested Laplace Integration (via the R package INLA). survHEinla "depends" on the main installation of survHE. This means that you shouldn't use survHEinla as a standalone package --- rather you use all the functions of survHE (to fit the models and the post-process the results); installing survHEinla 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

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

remotes::install_github("giabaio/survHEinla")

Usage

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

# Load survHE
library(survHE)

# Loads an example dataset from 'flexsurv'
data(bc)
     
# Fits the same model using INLA
# NB if survHEinla is installed, then the option 'method="inla"' automatically
#    loads it up in the background
inla = fit.models(formula=Surv(recyrs,censrec)~group,data=bc,
         distr="exp",method="inla")

# Prints the results in comparable fashion using the survHE method
print(inla)

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

# Or plots the survival curves and estimates
plot(inla)

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