- Implemented back-imputation procedure described in (Brizzi, O'Driscoll and
Dorigatti)[https://doi.org/10.1093/cid/ciac138]. This is implemented through
the new functions
backimpute_I()
, which takes a vector representing incidence and estimates the number of unobserved infections prior to the first reported case. estimate_R
now accepts thebackimputation_window
parameter, which determines the number of observations used to backimpute unobserved cases. If this is set to 0 no backimputation will be performed. 0 is the default value guaranteeing compatibility with previous versions of the package.- added vignette
vignettes/EpiEstim_backimputation.Rmd
andtests/testthat/test-backimpute.R
.
- estimate_R can now be applied to coarsely (non-daily) aggregated incidence data
- lintr is now part of EpiEstim continuous integration toolkit, alongside R CMD check. This should detect and eliminate suboptimal code pattern and potential bugs before they even make it to
master
(#159, @Bisaloo).
- new function estimate_joint to estimate the transmission advantage of a strain or variant
- New vignette
- This release is also available at https://zenodo.org/record/3871387 which is the source of the DOI for this codebase; for v2.2-3 that is doi:10.5281/zenodo.3871387. Also added as a link to the top-right of the landing page. Don't forget to update in the next release!
- Fixed bugs in draw_one_set_of_ancestries resulting from incorrect lengths and an undefined variable (issue #92) (#93, @jstockwin)
- Fixed incorrect quantiles (issue #88) (#89, @jstockwin)
- Plotting no longer displays TableGrob output (#87, @zkamvar).
This release contains various spelling fixes for CRAN maintenance.
sample_posterior_R()
samples values of R from the posterior distribution of anestimate_R
object (#70, @acori)
- Added a
NEWS.md
file to track changes to the package. (#74, @zkamvar) - Added tests for plotting with vdiffr. (#74, @zkamvar)
- Remove un-used dependencies that were added during hackout3: plyr, grid, and plotly (#74, @zkamvar)
- Remove compare package from suggests and use test_that version. (#74, @zkamvar)
- Bump minimum required version of coarseDataTools to 0.6-4 (#71, @zkamvar)
- Incidence objects are now handled appropriately with accessors (#65, @zkamvar)
- Changed function names to snake_case (only exception is that R remains
capital letter to avoid confusion between the reproduction number R and the
growth rate r) and to be more explicit; so
EstimateR
becomesestimate_R
,OverallInfectivity
becomesoberall_infectivity
,WT
becomeswallinga_teunis
, andDiscrSI
becomesdiscr_si
. Names of arguments to these functions have also changed to snake_case. Note that compatibility functions have been added so that the old functions as written in EpiEstim 1.1-0 should still work but throw a warning pointing to the newest functions. - Compatibility with
incidence
package: in the functionestimate_R
, the first argument, i.e. the incidence from which the reproduction number is calculated, can now be, either a vector of case counts (as in version 1.1-0) or anincidence
object (see R packageincidence
). - Accounting for imported cases: in the function
estimate_R
, the first argument, i.e. the incidence from which the reproduction number can now provide information about known imported cases: by specifying the first argument as either a dataframe with columns "local" and "imported", or anincidence
object with two groups (local and imported, see R packageincidence
). This new feature is described in Thompson et al. Epidemics 2019 (currently in review). - Additional methods available for function
estimate_R
: in addition tonon_parametric_si
,parametric_si
anduncertain_si
, which were already available in EpiEstim 1.1-0, two new methods have been added:si_from_data
orsi_from_sample
. These allow feeding functionestimate_R
data on observed serial intervals (methodsi_from_data
) or posterior samples of serial interval distributions obtained from such data (methodsi_from_sample
). These new features are described in Thompson et al. Epidemics 2019 (currently in review). - No more plotting option inside of
estimate_R
: estimate_R now generates on object of classestimate_R
, which can be plotted separately by using the newestimate_R_plots
function, which also now allows to plot several R estimates on a single plot. - New argument
config
forestimate_R
function: this is meant to minimise the number of arguments to functionestimate_R
; so argumentsmethod
,t_start
,t_end
,n1
,n2
,mean_si
,std_si
,std_mean_si
,min_mean_si
,max_mean_si
,std_std_si
,min_std_si
,max_std_si
,si_distr
,mean_prior
,std_prior
, andcv_posterior
are now specified as a group under this newconfig
argument. Such aconfig
argument must be of classestimate_R_config
and can be obtained as a results of the newmake_config
function. - New function
make_config
, which defines settings for functionestimate_R
, and sets defaults where arguments are missing. In particular, if argumentincid
is notNULL
, by defaultconfig$t_start
andconfig$t_end
will be set so that, when the configuration is used insideestimate_R
function, the reproduction number is estimated by default on sliding weekly windows (in EpiEstim 1.1-0 there was no default for the time window of estimation of R). - Added a vignette to illustrate main features of the package.
flu_2009_NYC_school
mers_2014_15
,MockRotavirus
stats
(to use the gamma distribution; it was already used in EpiEstim 1.1-0 but making the dependency explicit)coarseDataTools
,fitdistrplus
,coda
(used for the new methodssi_from_data
andsi_from_sample
inestimate_R
function to estimate the serial interval from data).incidence
(so thatestimate_R
can take anincidence
object as first argument)graphics
,reshape2
,ggplot2
,gridExtra
,scales
,grDevices
(to make new plots of outputs ofestimate_R
andwallinga_teunis
functions)