.
.
.
.
.
.
.
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.
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.
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.
Compilation now uses -DSTRICT_R_HEADERS and -DR_NO_REMAP.
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
.
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.
Compartmental model is generalized to support multiple
infected compartments, m
latent and n
infectious,
resulting in several backwards incompatible changes to the API;
see below.
adaptivetau and deSolve are now suggested, not imported, as they are needed only for simulation. Usage of simulated data sets is now everywhere conditional on successful loading of the dependency.
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.
‘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.
Typo in ‘src/sir.c’ triggering -Wformat is fixed.
Changes are logged in ‘inst/NEWS.Rd’.
‘DESCRIPTION’ sets 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’.
Depends: R (>= 4.3.0)
for amsmath
in PDF
output, which was not supported until 4.2.2.