-
wallinga_teunis()is now an S3 generic with methods forinteger,numeric,data.frame,incidenceandincidence2objects -
wallinga_teunis()now returns an S3 object with class "wallinga_teunis" (used to be "estimate_R")
- Superfluous argument "method" removed from
make_config()function
- The distribution names valid when using si_from_data option in estimate_R have been edited to be descriptive and self-explanatory.
- 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_Rnow accepts thebackimputation_windowparameter, 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.Rmdandtests/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_Robject (#70, @acori)
- Added a
NEWS.mdfile 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
EstimateRbecomesestimate_R,OverallInfectivitybecomesoberall_infectivity,WTbecomeswallinga_teunis, andDiscrSIbecomesdiscr_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
incidencepackage: 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 anincidenceobject (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 anincidenceobject 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_sianduncertain_si, which were already available in EpiEstim 1.1-0, two new methods have been added:si_from_dataorsi_from_sample. These allow feeding functionestimate_Rdata 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_plotsfunction, which also now allows to plot several R estimates on a single plot. - New argument
configforestimate_Rfunction: 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_posteriorare now specified as a group under this newconfigargument. Such aconfigargument must be of classestimate_R_configand can be obtained as a results of the newmake_configfunction. - New function
make_config, which defines settings for functionestimate_R, and sets defaults where arguments are missing. In particular, if argumentincidis notNULL, by defaultconfig$t_startandconfig$t_endwill be set so that, when the configuration is used insideestimate_Rfunction, 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_schoolmers_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_dataandsi_from_sampleinestimate_Rfunction to estimate the serial interval from data).incidence(so thatestimate_Rcan take anincidenceobject as first argument)graphics,reshape2,ggplot2,gridExtra,scales,grDevices(to make new plots of outputs ofestimate_Randwallinga_teunisfunctions)