.
.
.
.
sir.aoi gains formal argument xm and computes
the initial value of Y as
xm - init[1] - log(xm/init[1])/sum(R0) when skip.Y
is FALSE. Previously, it used init[2].
sir.aoi tests sum(R0) > 1 and
init[1] > 1/sum(R0) when skip.Y is FALSE.
.
sir.aoi gains formal arguments rtol and
atol with default expressions suitable for typical calls,
overriding those of deSolve function lsoda.
sir.aoi supports solution backward in time with
to < from.
.
.
David Earn is a contributor.
sir.aoi(..., root = function) is a multiple
time series object storing the solution until the last root or
time point. Attribute root.info stores details about the
system at the roots in the format list(tau, state).
Previously, sir.aoi discarded the solution and returned
only details about the system at the first root.
sir.aoi(..., root = function) no longer has
an attribute curvature storing the curvature of Y at
the root.
sir.aoi(..., aggregate = TRUE) has additional
columns storing the force of infection, incidence, and the
curvature of Y.
sir.aoi accepts new argument eps in order to
support equations with equal, nonzero rates of birth and death.
sir.aoi accepts new arguments F and
Fargs, enabling the user to set a forcing function.
sir.aoi accepts new arguments H and
Hargs, enabling the user to set a susceptible
hetereogeneity function.
sir.aoi accepts new arguments root.max and
root.break, enabling the user to set the number of roots
sought and indicate whether the solver should stop once that
number of roots is reached. The default behaviour is to stop once
one root is found and agrees with the previous behaviour.
sir.aoi accepts new argument skip.Y indicating
if solution of the equation for Y should not be attempted.
The method for generic function summary and class
sir.aoi accepts new argument name, enabling
approximation of tail exponents of different variables.
Function cbind.ts for working around PR#18583.
deconvolve accepts new argument x.pad,
enabling the user to decide the value of the elements with which
x is padded when start is unset.
New data set pneumonia, used in an example of
deconvolve usage.
The expression for \text{d}Y/\text{d}\tau
used by sir.aoi was wrong.
seir.canonical is removed in favour of more general
sir.aoi. The method for generic function summary
and class seir.canonical is removed in favour of a method
for class sir.aoi.
Function sir.aoi generalizing seir.canonical
in order to support rates of transmission and recovery structured
by age of infection.
Function seir.canonical providing a nondimensional
interface to a special case (constant transmission, without vital
dynamics, without loss of immunity) of seir usage. The
nondimensional parameters are the basic reproduction number and
the ratio of the mean latent period and mean generation interval.
A method for generic function summary and class
seir.canonical approximating the tail exponents of
prevalence.
Compilation uses -DSTRICT_R_HEADERS and -DR_NO_REMAP.
Formal argument init of fastbeta,
fastbeta.bootstrap, ptpi, and seir is
repositioned.
Formal arguments sigma and m of
fastbeta, fastbeta.bootstrap, ptpi, and
seir have constant default values (sigma = 1,
m = 1L) not depending on the values of other arguments.
seir gains logical argument aggregate
indicating whether latent and infectious compartments should be
aggregated.
seir arguments nu and mu gain
default values. In both cases, it is function (t) 0,
indicating no vital dynamics.
seir.R0, seir.ee, and seir.jacobian for
calculating the basic reproduction number, endemic equilibrium,
and Jacobian matrix.
fastbeta.matrix for calculating lower triangular
coefficient matrix.
Entry [2, 2] of the Jacobian matrix constructed by
seir(stochastic = FALSE, useCompiled = FALSE) was wrong.
seir handles more comprehensively the situation in
which the number of rows of the matrix returned by
deSolve function lsoda is less than
length.out. It now distinguishes termination due to found
roots from termination due to an unsuccessful solver call.
Warnings caught by -Wconversion are squashed.
Suggests: adaptivetau, deSolve rather than
Imports: adaptivetau, deSolve as those packages are needed
only for simulation. Usage of simulated data sets is now
everywhere conditional on successful loading of the dependency.
Argument constants of functions sir,
fastbeta, fastbeta.bootstrap, and ptpi is
replaced by arguments sigma, gamma, delta,
init, m, and n.
sir is now a wrapper calling new seir.
Arguments a and b of function ptpi
are replaced by arguments start and end so that
the interface is more similar to that of window.
ptpi returns list(value, diff, iter, x),
no longer list(value, delta, iter, X).
Simulations sir.e01 and sir.e02 are replaced
by seir.ts01 and seir.ts02. The replacements have
a latent compartment and a different set of attributes reflecting
the API of seir.
Compartmental model is generalized to support multiple
infected compartments, m latent and n infectious,
resulting in several backwards incompatible changes to the API;
see above.
More simulations set tl.params = list(epsilon = .)
to mitigate noise attributable to too big leaps in the adaptive
tau-leaping algorithm.
plot method for class fastbeta.bootstrap
uses dev.hold and dev.flush from grDevices
to avoid “incremental” graphical output on some devices.
‘data/*.R’ are no longer copied to ‘inst/scripts’
at install time by a make rule in ‘src/Makevars’.
There is no need: the scripts are preserved due to the setting of
BuildResaveData: no. Hence ‘src/Makevars’ is removed.
sir
expects constants = c(S0, I0, R0, gamma, delta),
no longer constants = c(gamma, S0, I0, R0).
fastbeta and fastbeta.bootstrap
expect constants = c(S0, I0, R0, gamma, delta),
no longer constants = c(gamma, S0, I0).
ptpi gains argument constants and loses
argument start.
It expects constants = c(Sa, Ia, Ra, gamma, delta),
no longer start = Sa.
fastbeta returns (modulo attributes)
cbind(S, I, R, beta), no longer cbind(beta, S, I).
ptpi(...)[[1L]] gives the state at time 0
or at time a conditional on new argument backcalc.
The default is a, no longer (implicitly) 0.
ptpi(...)[[4L]] has dimensions
c(b-a+1, 3, iter), no longer c(b-a+1, iter).
Simulation sir.e01 is generated by the same
parameters but is no longer stochastic.
Simulation sir.e02 gives the stochastic variant.
Compartmental model is generalized to support loss of
immunity at rate delta, resulting in several backwards
incompatible changes to the API; see below.
Depends: R (>= 4.3.0) for amsmath in PDF
output, which was not supported until 4.2.2.
BuildResaveData: no so that R CMD build
works without --no-resave-data when fastbeta is not
installed.
‘data/*.R’ are copied into ‘inst/scripts’
at install time by a make rule in ‘src/Makevars’.
Changes are logged in ‘inst/NEWS.Rd’.
Typo in ‘src/sir.c’ triggering -Wformat is fixed.