Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a day-of-week effect to simulated dataset #91

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
One more pass for language
  • Loading branch information
zsusswein committed Dec 2, 2024
commit 90f5f700e686fcd473deca09ab3db43fa7c0b7fe
27 changes: 13 additions & 14 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
#' considerations for measuring the effective reproductive number, Rt."
#' PLoS Computational Biology 16.12 (2020): e1008409. The data are simulated
#' from a stochastic SEIR compartmental model. The original timeseries and Rt
#' are available in the `incidence` and `true_rt` columns and with other
#' added or modified to increase noise and add a day-of-week effect.
#' are available in the `incidence` and `true_rt` columns and with additional
#' columns added or modified to increase noise and add a day-of-week effect.
#'
#' This synthetic dataset has a number of desirable properties:
#'
#' 1. The force of infection changes depending on the Rt, allowing for sudden
#' changes in the Rt. This allows for modeling of sudden changes in infection
#' dynamics, which might otherwise be difficult to capture. Rt estimation
#' framework
#' dynamics, which might otherwise be difficult to capture.
#'
#' 2. The realized Rt is known at each timepoint
#'
Expand All @@ -24,24 +23,24 @@
#' frameworks, providing practical guidance on how to use this dataset to
#' evaluate Rt estimates.
#'
#' In practice, we've found that the amount of observation noise in the
#' incidence and/or observed cases is often undesirably low for testing. Many
#' empirical datasets are much noisier. As a result, models built with these
#' settings in mind can perform poorly on this dataset or fail to converge. We
#' manually add observation noise and a day-of-week reporting effect.
#' In practice, we've found that the amount of observation noise is often
#' undesirably low for testing. Many empirical datasets are much noisier. As a
#' result, models built with these realistically noisy settings in mind can
#' perform poorly on this dataset or fail to converge. To better reflect realistic
#' settings, we manually add observation noise and a day-of-week reporting effect.
#'
#' @name stochastic_sir_rt
#' @format `stochastic_sir_rt` A data frame with 299 rows and 6 columns:
#' \describe{
#' \item{reference_date}{The date the cases were observed.}
#' \item{reference_date}{The date cases were observed.}
#' \item{true_rt}{The known, true Rt of the epidemic system.}
#' \item{dow}{The magnitude of the day-of-week effect added to the log of `incidence`.}
#' \item{incidence}{The true number of cases occurring on the `date` in the
#' simulated system.}
#' \item{true_cases}{The true number of cases occurring on the `date` in the
#' simulated system before observation noise or day-of-week effects.}
#' \item{obs_cases}{The observed number of cases on `date` after the day-of-week
#' reporting effect and observation noise have been applied to `incidence`.}
#' reporting effect and observation noise have been applied to `true_cases`.}
#' \item{obs_cases_no_dow}{The observed number of cases on `date` after observation
#' noise has been applied to `incidence`. It does not include a day of week effect.}
#' noise has been applied to `true_cases`. It does not include a day of week effect.}
#' }
#' @source
#' <https://github.com/cobeylab/Rt_estimation/tree/d9d8977ba8492ac1a3b8287d2f470b313bfb9f1d>
Expand Down
27 changes: 13 additions & 14 deletions man/stochastic_sir_rt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading