Releases: epiforecasts/cfrnow
Releases · epiforecasts/cfrnow
Release list
cfrnow 0.2.1
cfrnow 0.2.0
fit_cfr()andsimulate_linelist()take aWeibull()onset-to-death (and
onset-to-recovery) delay, alongsideLogNormal()andGamma().- Delay parameterisation now uses distspec's exported
natural_params()instead
of an internal helper; cfrnow requiresdistspec (>= 0.1.0). - New "Stratified and partially-pooled CFR" vignette: no-, complete- and
partial-pooling fits, with per-groupsummary()output. pp_check_cfr()runs a posterior-predictive check. It draws replicate line
lists from the posterior, replays the real-time truncation, and compares
observed death counts (and recoveries, in a two-outcome fit) and onset-to-death
delays against the replicates.summary()takes anascertainment_ratioargument to correct the CFR when
fatal and non-fatal cases enter the line list at different rates. Defaults to 1.fit_cfr()accepts intercept-free CFR formulas (e.g.cfr ~ 0 + group),
fitting one logit-CFR per group withcfr_prioron those coefficients.summary()reports a CFR per group for acfr ~ groupfit, onecfr[<group>]
row per group.
cfrnow 0.1.0
First release.
fit_cfr()estimates a real-time case fatality ratio from line-list data with a
Bayesian mixture-cure survival model. It is registered as anepidistmodel
type, so the CFR and the onset-to-death delay both takebrmsformulas.prepare_cfr_data()turns a line list into model inputs. It sorts each case, at
a chosen observation cut-off, into an observed death, a resolved non-death, or a
right-censored survivor.- The onset-to-death delay (LogNormal or Gamma) can be co-estimated or held fixed.
Hold it fixed and you get the Ghani/Nishiura estimator. - Pass a
recovery_datecolumn and a two-outcome fit also times recoveries. - Put a
brmsformula on the CFR or the delay for covariates or a time-varying
CFR. simulate_linelist()builds line lists for testing and examples.summary()andprint()report the corrected CFR, the delay moments,
convergence diagnostics, and a flag for when the CFR is only weakly identified.