Description Usage Arguments Details Value Author(s) Examples

View source: R/summary.coxedExpdur.R

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.

1 2 |

`object` |
The output from |

`stat` |
Either |

`...` |
For future methods |

If `bootstrap=TRUE`

in the call to `coxed`

then a bootstrapped standard error
and confidence interval is reported for the given statistic as well.

A scalar containing the mean or median duration, or a vector that also includes the bootstrapped standard error and confidence interval for this quantity.

Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden2@nd.edu>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
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")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.