incidental v0.1

0

Monthly downloads

0th

Percentile

Implements Empirical Bayes Incidence Curves

Make empirical Bayes incidence curves from reported case data using a specified delay distribution.

Readme

incidental

Overview

incidental contains an empirical Bayes incidence curve fitting from a set of reported cases and a delay distribution:

  • fit_incidence() fits incidence to a set of reported cases and a delay distribution.
  • incidence_to_df() utility function to return the output of fit_incidence() as a data frame.
  • plot() utility function to plot the output of fit_incidence()

You can learn more about incidental in the vignettes.

Installation

install.packages("incidental")

Functions in incidental

Name Description
covid_delay_dist Delay distribution from COVID-19 pandemic.
data_check Input data check
compute_log_incidence Compute log likelihood of incidence model
data_processing Data processing wrapper
diff_trans Transpose of the 1st difference operator
front_zero_pad Pad reported data with zeros in front
covid_new_york_city New York City data from the COVID-19 pandemic.
poisson_objective Poisson objective function
plot.incidence_spline_model Plot model from fit_incidence
incidental incidental: A package for computing incidence curves from delayed case records.
init_params Initialize spline parameters (beta)
make_likelihood_matrix Make delay likelihood matrix
make_ar_extrap_samps Make AR samples for extrapolation past end point
fit_incidence Fit incidence curve to reported data
regfun_grad Beta regularization function gradient
regfun Beta regularization function
marg_loglike_poisson_fisher Marginal log likelihood Fisher information matrix
marg_loglike_poisson_grad Marginal log likelihood gradient
make_spline_basis Create spline basis matrix
marg_loglike_poisson Marginal log likelihood This function computes the marginal probability of Pr(reported | beta). Note that lnPmat must be zero padded enough (or censored) to match the length of reported cases vector.
spanish_flu Daily flu mortality from 1918 flu pandemic.
scan_spline_dof Scan spline degrees of freedom
poisson_objective_grad Poisson objective function gradient
poisson_objective_post_cov_approx Compute Fisher information matrix for Poisson objective
scan_spline_lam Scan spline regularization parameter
regfun_hess Beta regularization function Hessian
train_val_split Split reported case data
train_and_validate Train and validate model on reported data
spanish_flu_delay_dist Delay distribution from 1918 flu pandemic.
sample_laplace_log_incidence_poisson Generate Laplace samples of incidence
incidence_to_df Export incidence model to data frame
compute_expected_cases Compute expected cases
No Results!

Vignettes of incidental

Name
data/kansas_model.rds
data/kansas_model_aic.rds
data/kansas_model_hyperparameters.rds
data/kansas_model_percent_thresh.rds
data/model_df_list.rds
incidental-tutorial.Rmd
No Results!

Last month downloads

Details

License MIT + file LICENSE
LazyData true
RoxygenNote 7.1.1
VignetteBuilder knitr
Encoding UTF-8
NeedsCompilation no
Packaged 2020-09-09 00:35:46 UTC; lhannah
Repository CRAN
Date/Publication 2020-09-16 09:50:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/incidental)](http://www.rdocumentation.org/packages/incidental)