Package: cfrnow 0.4.0

Sebastian Funk

cfrnow: Real-Time Case Fatality Ratio via a Mixture-Cure Survival Model

Estimates a real-time case fatality ratio (CFR) from line-list data using a Bayesian mixture-cure survival model, registered as an 'epidist' model type so the CFR and the onset-to-death delay both take 'brms' formulas. Each case is fatal with probability equal to the CFR and, when fatal, dies at an interval-censored onset-to-death delay; cases still alive at the observation cut-off are right-censored, which corrects the downward bias of the naive deaths / cases ratio in real time. The delay is co-estimated using the 'primarycensored' censored-distribution machinery.

Authors:Sebastian Funk [aut, cre]

cfrnow_0.4.0.tar.gz
cfrnow_0.4.0.zip(r-4.7-any)cfrnow_0.4.0.zip(r-4.6-any)cfrnow_0.4.0.zip(r-4.5-any)
cfrnow_0.4.0.tgz(r-4.6-any)cfrnow_0.4.0.tgz(r-4.5-any)
cfrnow_0.4.0.tar.gz(r-4.7-any)cfrnow_0.4.0.tar.gz(r-4.6-any)
cfrnow_0.4.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
cfrnow/json (API)

# Install 'cfrnow' in R:
install.packages('cfrnow', repos = c('https://epiforecasts.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/epiforecasts/cfrnow/issues

Pkgdown/docs site:https://epiforecasts.io

On CRAN:

Conda:

4.43 score 2 stars 7 scripts 7 exports 81 dependencies

Last updated from:df7b1da22c (on v0.4.0). Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develNOTE361
source / vignettesOK1054
linux-releaseNOTE372
macos-releaseNOTE188
macos-oldrelNOTE174
windows-develNOTE203
windows-releaseNOTE179
windows-oldrelNOTE225
wasm-releaseOK347

Exports:as_epidist_cure_modelfit_cfrposterior_cumulative_incidenceposterior_prob_deathpp_check_cfrprepare_cfr_datasimulate_linelist

Dependencies:abindbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscpp11descdigestdistributionaldistspecdplyrepidistfarverfuturefuture.applygenericsggdistggplot2ggridgesglobalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMatrixmatrixStatsmgcvmvtnormnleqslvnlmenumDerivotelparallellypillarpkgbuildpkgconfigplyrposteriorprimarycensoredprocessxpspurrrquadprogQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanrstantoolsS7scalesStanHeadersstringistringrtensorAtibbletidyrtidyselecttruncnormutf8vctrsviridisLitewithr

Real-time CFR over time
Simulation setup | Fitting a constant and a random-walk model | Weekly estimates from per-case draws | Estimates one week after the last onset | Estimates six weeks after the last onset | Other settings | Interpreting the two estimates

Last update: 2026-09-30
Started: 2026-09-30

Real-time CFR with cfrnow
The problem | A line list | Preparing the data at a cut-off | Fitting | Covariates and time-varying CFR | Delay family and fixing the delay | Recovery timing | Caveats

Last update: 2026-09-29
Started: 2026-07-01

Stratified and partially-pooled CFR
Why stratify, and why pool | A six-site line list | Three fits: complete, no, and partial pooling | Reading the estimates | Shrinkage | Varying the delay by group | Check the fit

Last update: 2026-09-23
Started: 2026-07-15