summary.coxedExpdur {coxed} | R Documentation |
The mean or median expected duration
Description
This function takes the output of coxed
and calculates the
mean or median of the expected durations across the observations for which durations
are estimated.
Usage
## S3 method for class 'coxedExpdur'
summary(object, stat = "mean", ...)
Arguments
object |
The output from |
stat |
Either |
... |
For future methods |
Details
If bootstrap=TRUE
in the call to coxed
then a bootstrapped standard error
and confidence interval is reported for the given statistic as well.
Value
A scalar containing the mean or median duration, or a vector that also includes the bootstrapped standard error and confidence interval for this quantity.
Author(s)
Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden2@nd.edu>
Examples
require(survival)
mv.surv <- Surv(martinvanberg$formdur, event = rep(1, nrow(martinvanberg)))
mv.cox <- coxph(mv.surv ~ postel + prevdef + cont + ident + rgovm + pgovno + tpgovno +
minority, method = "breslow", data = martinvanberg)
summary(mv.cox)
# NPSF method
ed1 <- coxed(mv.cox, method="npsf")
ed1$baseline.functions
ed1$exp.dur
summary(ed1, stat="mean")
summary(ed1, stat="median")
ed1 <- coxed(mv.cox, method="npsf", bootstrap = TRUE)
ed1$exp.dur
summary(ed1, stat="mean")
summary(ed1, stat="median")