Repository navigation
Clearer names for the inputs and outputs, a breakdown of convergence diagnostics by pathogen and time, and a fix for compiling the Stan models with newer stanc3. Code written for 0.1.0 may need updating: see Breaking changes.
Breaking changes
subtyped()'sunsubtyped_timeseriesargument is now
parent_timeseries, since it takes the total count for the parent
pathogen, covering both subtyped and unsubtyped cases; the previous name
suggested it took only the unsubtyped cases (#80). Any code calling
subtyped()withunsubtyped_timeserieswill need to use
parent_timeseries.- The Stan model parameters have descriptive names (#82).
ais now
log_incidencein random walk models andb_spline_coefin p-spline
models, where the trajectorya_newis nowlog_incidence;cand
c_neware nownoisy_incidence. Previouslyameant the trajectory in
one method and the spline coefficients in the other; now
log_incidenceis the latent log-incidence trend in every model. Code
that reads thestanfitobject infit$fitdirectly (e.g. with
bayesplotorrstan::summary()) will need to use the new names;
incidence(),growth_rate(),Rt()andproportion()are unaffected. - The
propcolumn in$measureis nowprob_above, since it is the
posterior probability that the quantity is above a threshold, not a
proportion (#79).growth_rate()andRt()return it for thresholds of 0
and 1, giving the probability that the epidemic is growing; their
documentation now says so.incidence()andproportion()no longer
return it, as the probability that incidence or a proportion is above 0
is always 1.
New features
diagnose_model()now returns aparameterstable giving each
parameter's R-hat and effective sample size, labelled with the pathogen
and time it refers to, and aplot()method shows R-hat or effective
sample size of the log-incidence trajectory over time by pathogen (#85).
Bug fixes
- Fixed the Stan models failing to compile with newer versions of stanc3,
which reject the old array syntax (e.g.real[] t,int Y[n]). This
broke the R-universe build (@jeroen, #77, #78).
Minor improvements
subtyped()now errors ifparent_timeseriesis smaller than the sum of
subtyped_timeseriesat any time point, since the subtyped cases are a
subset of the parent total (#80). Previously such data was accepted and
would silently underestimate the parent pathogen.
Documentation
- Further corrected the
influenzadataset documentation:inf_Ais all
influenza A positives, including those subtyped; counts are weekly
rather than daily; the date range matches the data included (January
2012 to February 2020); theinf_*columns are described as positive
laboratory specimens; andotheris described with how it is
calculated (#80). - The
subtyped()documentation, vignette and README now describe
parent_timeseriesas the total for the parent pathogen (#80).