print.expertsurv: Print a summary of the survival model(s) fitted by...

print.expertsurvR Documentation

Print a summary of the survival model(s) fitted by fit.models

Description

Prints the summary table for the model(s) fitted, with the estimate of the parameters - ported from survHE.

Usage

## S3 method for class 'expertsurv'
print(x, mod = 1, ...)

Arguments

x

the expertsurv object (the output of the call to fit.models)

mod

is the index of the model. Default value is 1, but the user can choose which model fit to visualise, if the call to fit.models has a vector argument for distr (so many models are fitted & stored in the same object)

...

additional options, including: digits = number of significant digits to be shown in the summary table (default = 6) original = a flag to say whether the original table from either flexsurv or rstan/JAGS should be printed

Value

Printed message (no object returned) providing estimates of the survival models.

Author(s)

Gianluca Baio

References

\insertRef

Baio.2020expertsurv

Examples

require("dplyr")
param_expert_example1 <- list()
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.15,0.5),
                                       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))
mle = 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)
print(mle)

expertsurv documentation built on Oct. 5, 2023, 5:09 p.m.