Learn R Programming

expertsurv (version 1.4.1)

summary.expertsurv: Prints a summary table for the distribution the mean survival time for a given model and data

Description

Calculates the mean survival time as the area under the survival curve - ported from survHE

Usage

# S3 method for expertsurv
summary(object, mod = 1, t = NULL, nsim = 1000, ...)

Value

A list comprising of the following elements:

mean.surv

A matrix with the simulated values for the mean survival times

tab

A summary table

Arguments

object

a expertsurv object (resulting from the call to fit.models)

mod

the model to be analysed (default = 1)

t

the vector of times to be used in the computation. Default = NULL, which means the observed times will be used. NB: the vector of times should be: i) long enough so that S(t) goes to 0; and ii) dense enough so that the approximation to the AUC is sufficiently precise

nsim

the number of simulations from the survival curve distributions to be used (to compute interval estimates)

...

Additional options

Author

Gianluca Baio

References

Baio.2020expertsurv

See Also

fit.models.expert, make.surv

Examples

Run this code
require("dplyr")
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")
summary(mle)

Run the code above in your browser using DataLab