NEWS | R Documentation |
News for R Package fastbeta
Changes in version 0.3.1 (2024-11-22)
INSTALLATION
Compilation now uses -DSTRICT_R_HEADERS and -DR_NO_REMAP.
BUG FIXES
Entry
[2, 2]
of the Jacobian matrix constructed byseir(stochastic = FALSE, useCompiled = FALSE)
was wrong.-
seir
handles more comprehensively the situation in which the number of rows of the matrix returned by deSolve functionlsoda
is less thanlength.out
. It now distinguishes termination due to found roots from termination due to an unsuccessful solver call. Warnings caught by -Wconversion are squashed.
NEW FEATURES
-
seir
gains logical argumentaggregate
indicating whether latent and infectious compartments should be aggregated. -
seir
argumentsnu
andmu
gain default values. In both cases, it isfunction (t) 0
, indicating no vital dynamics. -
seir.R0
,seir.ee
, andseir.jacobian
for calculating the basic reproduction number, endemic equilibrium, and Jacobian matrix. -
fastbeta.matrix
for calculating lower triangular coefficient matrix.
SIGNIFICANT USER-VISIBLE CHANGES
Formal argument
init
offastbeta
,fastbeta.bootstrap
,ptpi
, andseir
is repositioned.Formal arguments
sigma
andm
offastbeta
,fastbeta.bootstrap
,ptpi
, andseir
have constant default values (sigma = 1
,m = 1L
) not depending on the values of other arguments.
Changes in version 0.3.0 (2024-05-17)
INSTALLATION
-
adaptivetau and deSolve are now suggested, not imported, as they are only needed for simulation. Usage of simulated data sets is now everywhere conditional on successful loading of the dependency.
BUG FIXES
More simulations set
tl.params = list(epsilon = .)
to mitigate noise attributable to too big leaps in the adaptive tau-leaping algorithm.-
plot
method for classfastbeta.bootstrap
usesdev.hold
anddev.flush
from grDevices to avoid “incremental” graphical output on some devices.
NEW FEATURES
Compartmental model is generalized to support multiple infected compartments,
m
latent andn
infectious, resulting in several backwards incompatible changes to the API; see below.
SIGNIFICANT USER-VISIBLE CHANGES
Argument
constants
of functionssir
,fastbeta
,fastbeta.bootstrap
, andptpi
is replaced by argumentssigma
,gamma
,delta
,init
,m
, andn
.-
sir
is now a wrapper calling newseir
. Arguments
a
andb
of functionptpi
are replaced by argumentsstart
andend
so that the interface is more similar to that ofwindow
.-
ptpi
returnslist(value, diff, iter, x)
, no longerlist(value, delta, iter, X)
. Simulations
sir.e01
andsir.e02
are replaced byseir.ts01
andseir.ts02
. The replacements have a latent compartment and a different set of attributes reflecting the API ofseir
.
Changes in version 0.2.0 (2023-12-11)
INSTALLATION
-
‘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 ofBuildResaveData: no
. Hence ‘src/Makevars’ is removed.
NEW FEATURES
Compartmental model is generalized to support loss of immunity at rate
delta
, resulting in several backwards incompatible changes to the API; see below.
SIGNIFICANT USER-VISIBLE CHANGES
-
sir
expectsconstants = c(S0, I0, R0, gamma, delta)
, no longerconstants = c(gamma, S0, I0, R0)
. -
fastbeta
andfastbeta.bootstrap
expectconstants = c(S0, I0, R0, gamma, delta)
, no longerconstants = c(gamma, S0, I0)
. -
ptpi
gains argumentconstants
and loses argumentstart
. It expectsconstants = c(Sa, Ia, Ra, gamma, delta)
, no longerstart = Sa
. -
fastbeta
returns (modulo attributes)cbind(S, I, R, beta)
, no longercbind(beta, S, I)
. -
ptpi(...)[[1L]]
gives the state at time0
or at timea
conditional on new argumentbackcalc
. The default isa
, no longer (implicitly)0
. -
ptpi(...)[[4L]]
has dimensionsc(b-a+1, 3, iter)
, no longerc(b-a+1, iter)
. Simulation
sir.e01
is generated by the same parameters but is no longer stochastic. Simulationsir.e02
gives the stochastic variant.
Changes in version 0.1.1 (2023-11-28)
INSTALLATION
-
‘data/*.R’ are copied into ‘inst/scripts’ at install time by a
make
rule in ‘src/Makevars’. -
Depends: R (>= 4.3.0)
foramsmath
in PDF output, which was not supported until 4.2.2.
BUG FIXES
Typo in ‘src/sir.c’ triggering -Wformat is fixed.
NEW FEATURES
Changes are logged in ‘inst/NEWS.Rd’.
-
‘DESCRIPTION’ sets
BuildResaveData: no
, so thatR CMD build
works without --no-resave-data when fastbeta is not installed.