tidyepidemio (development version)
-
New tools for outbreak analytics, following current best practice:
-
epi_delay_dist()fits lognormal, gamma and Weibull delay distributions (incubation period, onset to report, onset to death, serial interval) by maximum likelihood, correcting for double interval censoring of daily data with the exact closed-form likelihood and, optionally, for right truncation during an ongoing outbreak (Park et al. 2024; Charniga et al. 2024). Families are ranked by AIC.epi_delay_pmf()turns a fit into daily probabilities forepi_cfr(),epi_nowcast()orepi_rt(). -
epi_offspring()estimates the reproduction number and the dispersionkof secondary cases (negative binomial), with the proportion of cases causing 80% of transmission (Lloyd-Smith et al. 2005; Endo et al. 2020).epi_chain_size()estimates the same from the sizes of transmission chains that died out (Blumberg and Lloyd-Smith 2013). -
epi_cfr()gives the naive and the delay-adjusted case fatality ratio (Nishiura et al. 2009) with likelihood-ratio intervals, overall or as the estimate settles over time (cumulative = TRUE).
-
New dataset
nz_covid_outcomes_2020: daily COVID-19 cases and deaths in New Zealand, February to June 2020 (Johns Hopkins CSSE, CC BY 4.0).-
tep_advise()andtep_interpret(): statistical advice and plain-language interpretation for epidemiology, which the tidyvisor package uses when it is installed (tidyvisor::tidyvisor()), alongside tidydiversity and tidymapr. tidyepidemio does not depend on tidyvisor.- Advice for six questions (outbreak, association, survival, diagnostic, surveillance, causal): checks of the data and the estimator to run, with code that uses the column names of the data.
- Interpretations of ratios and other
epi_resultobjects, and of the results ofepi_rt(),epi_doubling_time(),epi_diagnostic(),epi_mantel_haenszel(),epi_surveillance(),epi_gcomp(),epi_ipw()andepi_kaplan_meier(), each ending with “After the overall test” (what to do next, and what not to) and “For the paper” (a Results sentence, the figure, the table and the Methods, with STROBE and STARD where they apply). - These results now carry a class naming what they are (
tep_rt,tep_growth,tep_survival, …) in front of their tibble classes.
tidyepidemio 1.2.0
Association and regression
-
epi_mantel_haenszel()now returns a Robins-Breslow-Greenland confidence interval and a Breslow-Day test of odds-ratio homogeneity (Tarone-corrected). -
epi_risk_ratio(),epi_odds_ratio()andepi_attributable_risk()gain acorrectionargument (for example 0.5) applied when any 2x2 cell is zero. -
epi_adjusted_odds_ratio(),epi_adjusted_risk_ratio()andepi_adjusted_rate_ratio()share one fitting engine and gainweights, HC0/HC1 and cluster-robust standard errors (robust,cluster), effect modification with per-level estimates and an interaction test (modifier), and natural-spline terms (nonlinear).splinesandMASSare now imported.
Survival
-
epi_kaplan_meier()andepi_cumulative_incidence()accept delayed entry (entry) for left-truncated data. -
epi_cumulative_incidence()returns Aalen-Johansen confidence limits.
Causal inference and diagnostics
-
epi_weighted_effect()gains percentile bootstrap intervals (bootstrap). -
epi_paired_diagnostic()returns Tango score intervals for paired differences in sensitivity and specificity.
Surveillance
-
epi_surveillance()andepi_seasonal_surveillance()support negative binomial baselines (family = "negbin"), report upper-tail p-values, and adjust alerts for multiple testing (adjust). -
epi_cusum_calibrate()simulates overdispersed nulls (size) and calibrates several independent series together (n_series).
Fixes
-
epi_rt()reports its intended error when.dataalready has anrtcolumn.
tidyepidemio 1.1.0
- Preserve epidemiological class and metadata across supported grouped, row-preserving dplyr operations, including ungrouping; reject grouped binding or casting when provenance or grouping differs.
- Added data-first
epi_fit_renewal()andepi_fit_compartmental()helpers, including tidy selections and non-syntactic column names. - Added randomized reference and conservation tests, an unrun multi-platform CI configuration, and a plan for independent validation.
tidyepidemio 1.0.0
- Audited the requested implementation areas and added an implementation and limitations guide plus synthetic cohort, outbreak and clinical workflows.
- Added cross-module integration tests and an explicit low-level model example.
- Reject row-binding or casting plain frames with epidemiological subclasses to prevent unintended provenance inheritance; validate metadata names.
- Reject grouped data in low-level epidemic model engine fits, consistent with their documented single-series contract.
tidyepidemio 0.9.0
- Added restricted mean survival time with Greenwood standard errors and clipped Wald confidence limits; validates the chosen horizon against observed follow-up.
- Added stratified individual bootstrap percentile intervals for empirical ROC AUC, and exact paired diagnostic sensitivity and specificity comparisons.
tidyepidemio 0.8.0
- Added cohort follow-up with optional administrative censoring, and empirical ROC curves and plotting with tie-aware AUC and predictive values.
- Added propensity-weighted risks and contrasts with optional individual percentile bootstrap that refits the exposure model in every replicate.
- Added explicit-history baking for supported epidemiological recipe steps and a training-only seasonal Fourier Poisson surveillance screen.
- Improved upper-tail Poisson quantile calculations for very small alert levels.
tidyepidemio 0.7.0
- Added group-aware temporal lags and past-only rolling means with explicitly supplied history and strict within-group time ordering.
- Added expanding rolling-origin renewal forecast backtesting, with uncertainty and training-only estimation at each origin.
- Added Fisher exact and Mantel-Haenszel association tests and predictive values transported to user-supplied target prevalences. Uninformative stratified tests now fail explicitly rather than returning NaN.
tidyepidemio 0.6.0
- Added attributable fractions, descriptive number needed to treat or harm, fixed-horizon Kaplan-Meier risk, binary calibration summaries and tables, and decision curves.
- Added deterministic square spatial-block assignment for spatial resampling.
- Fixed integer overflow in odds ratios and Mantel-Haenszel odds ratios for large cohorts; added large-sample regression tests.
tidyepidemio 0.5.0
- Added marginal logistic g-computation with optional individual bootstrap, stabilized and unstabilized ATE propensity weights, weighted risk contrasts, and standardized mean-difference balance diagnostics.
- Added daily and Monday-start weekly epidemic curves with explicit zero filling, and a t confidence interval for the mean serial interval.
- Documented identification assumptions, separation diagnostics, bootstrap fit failures, fixed reference variance for balance, and limitations of each method.
