Converts the estimates component of a vefit object into a
long-format data frame for easy plotting and analysis.
Each row represents one term (cumulative incidence or derived effect measure) at a specific timepoint.
Usage
estimates_to_df(estimates)
Arguments
- estimates
A list of matrices, typically from fit$estimates in a vefit
object. Each matrix (e.g., cuminc_0, cuminc_1, vaccine_effectiveness/risk_ratio)
contains estimates, confidence intervals, and related statistics evaluated
at different timepoints.
Value
A long-format data frame with:
t0: the timepoint
term: what was estimated (cuminc_0, cuminc_1, or vaccine_effectiveness/risk_ratio)
Remaining columns from the original matrices (estimates, confidence intervals, ad related statistics.)