| NEWS | R Documentation |
Fixed obsolete .path.package() calls.
Small corrections in the documentation.
update.twinstim() performs better in preserving
the original initial values of the parameters.
New pre-defined spatial interaction function
siaf.powerlawL(), which implements a _L_agged power-law
kernel, i.e. accounts for uniform short-range dispersal.
New method for outbreak detection: earsC
(CUSUM-method described in the CDC Early Aberration Reporting
System, see Hutwagner et al, 2003).
New features and minor bug fixes for the "twinstim"
part of the package (see below).
Yet another p-value formatting function formatPval()
is now also part of the surveillance package.
polyCub.SV() now also accepts objects of classes
"Polygon" and "Polygons" for convenience.
siaf.lomax is deprecated and replaced by
siaf.powerlaw (re-parametrization).
twinstim()-related) The temporal plot-method for class "epidataCS"
now understands the add parameter to add the histogram to an
existing plot window, and auto-transforms the t0.Date
argument using as.Date() if necessary.
nobs() methods for classes "epidataCS" and
"twinstim".
New argument verbose for twinstim() which, if
set to FALSE, disables the printing of information messages
during execution.
New argument start for twinstim(), where (some)
initial parameter values may be provided, which overwrite those in
optim.args$par, which is no longer required (as a naive
default, a crude estimate for the endemic intercept and zeroes for
the other parameters are used).
Implemented a wrapper stepComponent() for step()
to perform algorithmic component-specific model selection in
"twinstim" models. This also required the implementation of
suitable terms() and extractAIC() methods. The single-step
methods add1() and drop1() are also available.
The update.twinstim() method now by default uses the
parameter estimates from the previous model as initial values for
the new fit (new argument use.estimates = TRUE).
as.epidataCS() checks for consistency of the area of
W and the (now really obligatory) area column in
stgrid.
simulate.twinstim() now by default uses the previous
nCircle2Poly from the data argument.
direction argument for untie.epidataCS().
The toLatex-method for "summary.twinstim" got
different defaults and a new argument eps.Pvalue.
New xtable-method for "summary.twinstim" for
printing the covariate effects as risk ratios (with CI's and p-values).
hhh4()-related) New argument hide0s in the plot-method for class
"ah4".
New argument timevar for addSeason2formula(),
which now also works for long formulae.
The surveillance package is again backward-compatible with R version 2.14.0, which is now declared as the minimum required version.
This new version mainly improves upon the twinstim() and
hhh4() implementations (see below).
As requested by the CRAN team, examples now run faster. Some
are conditioned on the value of the new package option
"allExamples", which usually defaults to TRUE (but is
set to FALSE for CRAN checking, if timings are active).
Moved some rarely used package dependencies to “Suggests:”, and also removed some unused packages from there.
Dropped strict dependence on gpclib, which has a
restricted license, for the surveillance package to be clearly
GPL-2. Generation of "epidataCS" objects, which makes use of
gpclib's polygon intersection capabilities, now requires prior
explicit acceptance of the gpclib license via setting
surveillance.options(gpclib = TRUE). Otherwise,
as.epidataCS() and simEpidataCS() may not be used.
twinstim()-related) Speed-up by memoisation of the siaf cubature (using
the memoise package).
Allow for nlm-optimizer (really not recommended).
Allow for nlminb-specific control arguments.
Use of the expected Fisher information matrix can be disabled
for nlminb optimization.
Use of the effRange-trick can be disabled in
siaf.gaussian() and siaf.lomax(). The default
effRangeProb argument for the latter has been changed from
0.99 to 0.999.
The twinstim() argument nCub has been replaced
by the new control.siaf argument list. The old
nCub.adaptive indicator became a feature of the
siaf.gaussian() generator (named F.adaptive there) and
does no longer depend on the effRange specification, but uses
the bandwidth adapt*sd, where the adapt parameter may be
specified in the control.siaf list in the twinstim()
call. Accordingly, the components "nCub" and
"nCub.adaptive" have been removed from the result
of twinstim(), and are replaced by "control.siaf".
The "method" component of the twinstim() result
has been replaced by the whole "optim.args".
The new "Deriv" component of siaf specifications
integrates the “siaf$deriv” function over a polygonal domain.
siaf.gaussian() and siaf.lomax() use polyCub.SV()
(with intelligent alpha parameters) for this task
(previously: midpoint-rule with naive bandwidth)
scaled iafplot() (default FALSE). The
ngrid parameter has been renamed to xgrid and is more
general.
The "simulate" component of siaf's takes an
argument ub (upperbound for distance from the source).
Numerical integration of spatial interaction functions with an
Fcircle trick is more precise now; this slightly changes
previous results.
New S3-generic untie() with a method for the
"epidataCS" class (to randomly break tied event times and/or
locations).
Renamed N argument of polyCub.SV() to
nGQ, and a to alpha, which both have new
default values.
The optional polygon rotation proposed by Sommariva &
Vianello is now also implemented (based on the corresponding MATLAB
code) and available as the new rotation argument.
The scale.poly() method for "gpc.poly" is now
available as scale.gpc.poly(). The default return class of
discpoly() was changed from "gpc.poly" to
"Polygon".
An intensityplot()-method is now also implemented for
"simEpidataCS".
hhh4()-related)Significant speed-up (runs about 6 times faster now, amongst others by many code optimizations and by using sparse Matrix operations).
hhh4() optimization routines can now be customized for
the updates of regression and variance parameters seperately, which
for instance enables the use of Nelder-Mead for the variance
updates, which seems to be more stable/robust as it does
not depend on the inverse Fisher info and is usually faster.
The ranef() extraction function for "ah4" objects
gained a useful tomatrix argument, which re-arranges random
effects in a unit x effect matrix (also transforming CAR effects
appropriately).
Generalized hhh4() to also capture parametric
neighbourhood weights (like a power-law decay). The new function
nbOrder() determines the neighbourhood order matrix
from a binary adjacency matrix (depends on package spdep).
New argument check.analyticals (default FALSE)
mainly for development purposes.
Fixed sign of observed Fisher information matrix in
twinstim.
Simulation from the Lomax kernel is now correct (via polar coordinates).
Fixed modifyListcall() to also work with updated NULL arguments.
Fixed wrong Fisher information entry for the overdispersion
parameter in hhh4-models.
Fixed wrong entries in penalized Fisher information wrt the combination fixed effects x CAR intercept.
Fixed indexing bug in penalized Fisher calculation in the case of multiple overdispersion parameters and random intercepts.
Fixed bug in Fisher matrix calculation concerning the relation of unit-specific and random effects (did not work previously).
Improved handling of non-convergent / degenerate solutions during
hhh4 optimization. This involves using ginv() from
package MASS, if the penalized Fisher info is singular.
Correct labeling of overdispersion parameter in
"ah4"-objects.
Some control arguments of hhh4() have more clear
defaults.
The result of algo.farrington.fitGLM.fast() now
additionally inherits from the "lm" class to avoid warnings
from predict.lm() about fake object.
Improved ‘NAMESPACE’ imports.
Some additional tiny bug fixes, see the subversion log on R-Forge for details.
This is mainly a patch release for the twinstim-related
functionality of the package.
Apart from that, the package is now again compatible with older
releases of R (< 2.15.0) as intended (by defining paste0() in
the package namespace if it is not found in R base at
installation of the surveillance package).
Important new twinstim()-feature: fix parameters
during optimization.
Useful update-method for "twinstim"-objects.
New [[- and plot-methods for
"simEpidataCSlist"-objects.
simEpidataCS() received tiny bug fixes and is now
able to simulate from epidemic-only models.
R0-method for "simEpidataCS"-objects (actually
a wrapper for R0.twinstim()).
Removed dimyx and eps arguments from
R0.twinstim(); now uses nCub and
nCub.adaptive from the fitted model and applies the same
(numerical) integration method.
animate.epidata is now compatible with the
animation package.
More thorough documentation of "twinstim"-related
functions including many examples.
"twinstim"-related)nlminb (instead of optim's "BFGS") is
now the default optimizer (as already documented).
The twinstim-argument nCub can now be omitted when
using siaf.constant() (as documented) and is internally set to
NA_real_ in this case. Furthermore, nCub and
nCub.adaptive are set to NULL if there is
no epidemic component in the model.
toLatex.summary.twinstim now again works for
summary(*, test.iaf=FALSE).
print- and summary-methods for
"epidataCS" no longer assume that the BLOCK index
starts at 1, which may not be the case when using a subset in
simulate.twinstim().
The "counter" step function returned by
summary.epidataCS() does no longer produce false
numbers of infectives (they were lagged by one timepoint).
plot.epidataCS() now resolves ... correctly and
the argument colTypes takes care of a possible
subset.
simEpidataCS() now also works for endemic-only models
and is synchronised with twinstim() regarding the
way how siaf is numerically integrated (including the
argument nCub.adaptive).
Fixed problem with simEpidataCS() related to missing
‘NAMESPACE’ imports (and re-exports) of marks.ppp and
markformat.default from spatstat, which are required
for spatstat::runifpoint() to work, probably because
spatstat currently does not register its S3-methods.
Improved error handling in simEpidataCS(). Removed a
browser()-call and avoid potentially infinite loop.
"twinSIR"-related) The .allocate argument of simEpidata() has
now a fail-save default.
Simulation without endemic cox()-terms now works.
Simplified imdepi data to monthly instead of weekly
intervals in stgrid for faster examples and reduced package
size.
The environment of all predefined interaction functions for
twinstim() is now set to the .GlobalEnv. The previous
behaviour of defining them in the parent.frame() could have
led to huge save()'s of "twinstim" objects even with
model=FALSE.
simulate.twinSIR only returns a list of epidemics if
nsim > 1.
simulate.twinstim uses nCub and
nCub.adaptive from fitted object as defaults.
Removed the ...-argument from simEpidataCS().
The coefficients returned by simEpidataCS() are now stored
in a vector rather than a list for compatibility with
"twinstim"-methods.
Argument cex.fun of intensityplot.twinstim() now
defaults to the sqrt function (as in plot.epidataCS().
Besides minor bug fixes, additional functionality has entered the package and a new attempt is made to finally release a new version on CRAN (version 1.3 has not appeared on CRAN), including a proper ‘NAMESPACE’.
Support for non-parametric back-projection using the function
backprojNP() which returns an object of the new
"stsBP" class which inherits from "sts".
Bayesian nowcasting for discrete time count data is implemented in
the function nowcast().
Methods for cubature over polygonal domains can now also visualize what
they do. There is also a new quasi-exact method for cubature of the
bivariate normal density over polygonal domains. The
function polyCub() is a wrapper for the different
methods.
residuals.twinstim() and residuals.twinSIR():
extract the “residual process”, see Ogata
(1988). The residuals of "twinSIR" and
"twinstim" models may be checked graphically by the new
function checkResidualProcess().
Many new features for the "twinstim" class of
self-exciting spatio-temporal point process models (see
below).
"twinstim" Modified arguments of twinstim(): new ordering, new
argument nCub.adaptive, removed argument
typeSpecificEndemicIntercept (which is now specified as part of
the endemic formula as (1|type)).
Completely rewrote the R0-method (calculate “trimmed” and
“untrimmed” R_0 values)
The “trimmed” R0 values are now part of the
result of the model fit, as well as bbox(W). The
model evaluation environment is now set as attribute of the
result if model=TRUE.
New predefined spatial kernel: the Lomax power law kernel
siaf.lomax()
plot-methods for "twinstim"
(intensityplot() and iafplot())
as.epidataCS() now auto-generates the stop-column if this is missing
print-method for class "summary.epidataCS"
[- and subset-method for "epidataCS"
(subsetting ...$events)
plot-method for "epidataCS"
Improved documentation for the new functionalities.
Updated references.
twinSIR's intensityPlot is now a method of the
new S3-generic function intensityplot.
This is a major realease integrating plenty of new code (unfortunately
not all documented as good as it could be). This includes code
for the "twinstim" and the "hhh4" model.
The "twinSIR" class of models has been
migrated from package RLadyBug to surveillance.
It may take a while before this version will become available from CRAN.
For further details see below.
Renamed the "week" slot of the "sts" S4 class to "epoch".
All saved data objects have accordingly be renamed, but some hazzle
is to be expected if one you have old "sts" objects stored in binary
form. The function convertSTS() can be used to
convert such “old school” "sts" objects.
Removed the functions algo.cdc() and algo.rki().
Support for "twinSIR" models (with associated
"epidata" objects) as described
in Höhle (2009) has been moved from package
RLadyBug to surveillance.
That means continuous-time discrete-space SIR models.
Support for "twinstim" models as described in
Meyer et al (2012). That means continuous-time
continuous-space infectious disease models.
Added functionality for non-parametric back projection
(backprojNP()) and
now-casting (nowcast()) based on "sts" objects.
Replaced the deprecated getSpPPolygonsLabptSlots method with calls to the coordinates method when plotting the map slot.
Minor proof-reading of the documentation.
Added an argument "extraMSMargs" to the algo.hmm function.
Fixed bug in outbreakP() when having observations equal to zero
in the beginning. Here, \hat{μ}^{C1} in (5) of Frisen et al (2008)
is zero and hence the log-based summation in the code failed.
Changed to product as in the original code, which however might be
less numerically stable.
Fixed bug in stcd which added one to the calculated index of idxFA and idxCC. Thanks to Thais Rotsen Correa for pointing this out.
Added algo.outbreakP() (Frisen & Andersson, 2009) providing a
semiparametric approach for outbreak detection for Poisson
distributed variables.
Added a pure R function for extracting ISO week and year from Date
objects. This function (isoWeekYear) is only called if "%G" and "%V"
format strings are used on Windows (sessionInfo()[[1]]$os == "mingw32")
as this is not implemented for "format.Date" on Windows.
Thanks to Ashley Ford, University of Warwick, UK for identifying
this Windows specific bug.
For algo.farrington() a faster fit routine "algo.farrington.fitGLM.fast"
has been provided by Mikko Virtanen, National Institute for Health
and Welfare, Finland. The new function calls glm.fit()
directly, which gives a doubling of speed for long series. However, if one
wants to process the fitted model output some of the GLM routines might
not work on this output. For backwards compability the argument
control$fitFun = "algo.farrington.fitGLM" provides the old (and slow)
behaviour.
A few minor bug fixes
Small improvements in the C-implementation of the twins()
function by Daniel Sabanés Bové fixing the segmentation fault
issue on 64-bit architectures.
Added the functions categoricalCUSUM and LRCUSUM.runlength for the CUSUM monitoring of general categorical time series (binomial, beta-binomial, multinomial, ordered response, Bradley-Terry models).
Added the functions pairedbinCUSUM and pairedbinCUSUM.runlength implementing the CUSUM monitoring and run-length computations for a paired binary outcome as described in Steiner et al. (1999).
Experimental implementation of the prospective space-time cluster detection described in Assuncao and Correa (2009).
Added a demo("biosurvbook") containing the code of an upcoming
book chapter on how to use the surveillance package. This
contains the description of ISO date use, negative binomial CUSUM,
run-length computation, etc. From an applicational point of view
the methods are illustrated by Danish mortality monitoring.
Fixed a small bug in algo.cdc found by Marian Talbert Allen which resulted in the control$m argument being ignored.
The constructor of the sts class now uses the argument
"epoch" instead of weeks to make clearer that also
daily, monthly or other data can be handled.
Added additional epochAsDate slot to sts class. Modified plot functions so they can handle ISO weeks.
algo.farrington now also computes quantile and median of the predictive distribution. Furthermore has the computation of reference values been modified so its a) a little bit faster and b) it is also able to handle ISO weeks now. The reference values for date t0 are calculated as follows: For i, i=1,..., b look at date t0 - i*year. From this date on move w months/weeks/days to the left and right. In case of weeks: For each of these determined time points go back in time to the closest Monday
Renamed the functions obsinyear to epochInYear, which now also handles objects of class Date.
Negative Binomial CUSUM or the more general NegBin likelihood ratio detector is now implemented as part of algo.glrnb. This includes the back calculation of the required number of cases before an alarm.
Time varying proportion binomial CUSUM.
Current status: Development version available from http://surveillance.r-forge.r-project.org/
Rewriting of the plot.sts.time.one function to use polygons
instead of lines for the number of observed cases. Due cause
a number of problems were fixed in the plotting of the legend.
Plotting routine now also handles binomial data, where the
number of observed cases y are stored in "observed" and the
denominator data n are stored in "populationFrac".
Problems with the aggregate function not operating correctly for the populationFrac were fixed.
The "rogerson" wrapper function for algo.rogerson was modified so it
now works better for distribution "binomial". Thus a time varying
binomial cusum can be run by calling
rogerson( x, control(..., distribution="binomial"))
An experimental implementation of the twins model documented in Held, L., Hofmann, M., Höhle, M. and Schmid V. (2006) A two-component model for counts of infectious diseases, Biostatistics, 7, pp. 422–437 is now available as algo.twins.
Fixed a few small problems which gave warnings in the CRAN distribution
The algo_glrpois function now has an additional "ret" arguments,
where one specifies the return type. The arguments of the underlying
c functions have been changed to include an additional direction and
return type value arguments.
added restart argument to the algo.glrpois control object, which allows the user to control what happens after the first alarm has been generated
experimental algo.glrnb function is added to the package. All calls to algo.glrpois are now just alpha=0 calls to this function. However, the underlying C functions differentiate between poisson and negative case