Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/summary.coxedMargin.R

This function reports summary statistics for the changes in duration that occur when
comparing observations in `newdata2`

to observations in `newdata`

as specified
in the original call to `coxed`

.

1 2 |

`object` |
The output from |

`stat` |
Either |

`...` |
For future methods |

`coxed`

calculates a vector of expected durations for every observation
in `newdata2`

and `newdata`

(these data frames must have the same number of
observations, and corresponding rows are assumed to refer to the same observation), and
subtracts the expected duration from `newdata2`

from the expected duration from
`newdata`

. That generates a vector of marginal changes in duration for every
observation. To generalize a finding across observations, either the mean (if `type="mean"`

)
or the median (if `type="median"`

) of these differences is reported, along with the
mean/median of the expected durations from each of the two covariate profiles.
If `bootstrap=TRUE`

in the call to `coxed`

then a bootstrapped standard error
and confidence interval is reported for each of these quantities as well.

A data.frame containing the mean or median duration for each of `newdata2`

and
`newdata`

and the differences in these durations across the two covariate profiles.
If `bootstrap=TRUE`

in the call to `coxed`

, the data frame also includes
the bootstrapped standard error and confidence interval for these quantities.

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

1 2 3 4 5 6 7 8 9 10 | ```
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)
me <- coxed(mv.cox, method="npsf", bootstrap = FALSE,
newdata = dplyr::mutate(martinvanberg, rgovm=0),
newdata2 = dplyr::mutate(martinvanberg, rgovm=1.24))
summary(me, stat="mean")
summary(me, 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.