expertsurv-package {expertsurv} | R Documentation |
Incorporating Expert Opinion with Parametric Survival Models
Description
Contains functions to include expert opinion with the parametric models commonly
used in health economic modelling. Theoretical details are described elsewhere (Cooney and White 2023). Borrows many functions from the survHE
package (Baio 2020) and flexsurv
package (Jackson 2016).
Details
Package: | expertsurv |
Type: | Package |
Version: | 1.4.0 |
Date: | 2023-09-22 |
License: | MIT + file LICENSE |
LazyLoad: | yes |
Integrate expert opinions on survival and mean differences in survival with common parametric survival models using either a Bayesian or frequentist framework.
Author(s)
Philip Cooney Package Creator, Maintainer
Arthur White Thesis Supervisor
References
P Cooney (2023). expertsurv: Incorporating expert opinion into parametric survival models.
Baio G (2020). “survHE: Survival Analysis for Health Economic Evaluation and Cost-Effectiveness Modeling.” Journal of Statistical Software, 95(14), 1–47. doi:10.18637/jss.v095.i14. Cooney P, White A (2023). “Direct Incorporation of Expert Opinion into Parametric Survival Models to Inform Survival Extrapolation.” Medical Decision Making, 1(1), 0272989X221150212. doi:10.1177/0272989X221150212, PMID: 36647200, https://doi.org/10.1177/0272989X221150212, https://doi.org/10.1177/0272989X221150212. Jackson C (2016). “flexsurv: A Platform for Parametric Survival Modeling in R.” Journal of Statistical Software, 70(8), 1–33. doi:10.18637/jss.v070.i08.
Examples
#Define expert opinion
require("dplyr")
param_expert_example1 <- list()
#1 timepoint and 2 experts with equal weight,
#first a normal distribution, second a non-standard t-distribution with
#3 degrees of freedom
param_expert_example1[[1]] <- data.frame(dist = c("norm","t"),
wi = c(0.5,0.5), # Ensure Weights sum to 1
param1 = c(0.1,0.12),
param2 = c(0.05,0.05),
param3 = c(NA,3))
timepoint_expert <- 14
data2 <- data %>% rename(status = censored) %>% mutate(time2 = ifelse(time > 10, 10, time),
status2 = ifelse(time> 10, 0, status))
example1 <- fit.models.expert(formula=Surv(time2,status2)~1,data=data2,
distr=c("wph", "gomp"),
method="mle",
pool_type = "log pool",
opinion_type = "survival",
times_expert = timepoint_expert,
param_expert = param_expert_example1)
#Visualize the goodness of fit
model.fit.plot(example1, type = "aic")
#Visualize the survival curve
plot(example1, add.km = TRUE, t = 0:30)