Changelog
Source:NEWS.md
spOccupancy 0.4.0
 Major new functionality for fitting multiseason (i.e., spatiotemporal) singlespecies occupancy models using the functions
tPGOcc()
andstPGOcc()
.  Fixed a bug in calculation of the detection probability values in
fitted()
functions for all spOccupancy model objects. See this Github issue for more details.  Fixed an error that occurred when predicting for multispecies models and setting
ignore.RE = TRUE
.  Fixed other small bugs that caused model fitting functions to break under specific circumstances.
spOccupancy 0.3.2
CRAN release: 20220521
 Fixed a bug in
waicOcc()
for integrated models (intPGOcc()
andspIntPGOcc()
) that sometimes resulted in incorrect estimates of WAIC for data sets other than the first data set. We strongly encourage users who have usedwaicOcc()
with an integrated model to rerun their analyses using v0.3.2.  Fixed a bug introduced in v0.3.0 that sometimes resulted in incorrect predictions from a spatiallyexplicit model with nonspatial random effects in the occurrence portion of the model. We strongly encourage users who have used
predict()
on a spatiallyexplicit model with nonspatial random effects in the occurrence portion of the model to rerun their analyses using v0.3.2.  Users can now specify a uniform prior on the spatial variance parameter instead of an inverseGamma prior. We also allow users to fix the value of the spatial variance parameter at the initial value. See the reference pages of spatiallyexplicit functions for more details.
 Slight changes in the information printed when fitting spatiallyexplicit models.
 Removed dependency on spBayes to pass CRAN checks.
spOccupancy 0.3.1
CRAN release: 20220413
 Fixed two small problems with
intPGOcc()
andspIntPGOcc()
that were accidentally introduced in v0.3.0. See this Github issue for more details.  Adapted C/C++ code to properly handle characters strings when calling Fortran BLAS/LAPACK routines following the new requirements for R 4.2.0.
spOccupancy 0.3.0
CRAN release: 20220329
spOccupancy Version 0.3.0 contains numerous substantial updates that provide new functionality, improved computational performance for model fitting and subsequent model checking/comparison, and minor bug fixes. The changes include:
 Additional functionality for fitting spatial and nonspatial multispecies occupancy models with residual species correlations (i.e., joint species distribution models with imperfect detection). See documentation for
lfMsPGOcc()
andsfMsPGOcc()
. We also included the functionslfJSDM()
andsfJSDM()
which are more typical joint species distribution models that fail to explicitly account for imperfect detection.  All singlespecies and multispecies models allow for unstructured random intercepts in both the occurrence and detection portions of the occupancy model. Prior to this version, random intercepts were not supported in the occurrence portion of spatiallyexplicit models.

predict()
functions for singlespecies and multispecies models now include the argumenttype
, which allows for prediction of detection probability (type = 'detection'
) at a set of covariate values as well as predictions of occurrence (type = 'occupancy'
).  All models are substantially faster than version 0.2.1. We improved performance by implementing a change in how we sample the latent PolyaGamma variables in the detection component of the model. This results in substantial increases in speed for models where the number of replicates varies across sites. We additionally updated how nonspatial random effects were sampled, which also contributes to improved computational performance.
 All model fitting functions now include the object
like.samples
in the resulting model object, which contains model likelihood values needed for calculation of WAIC. This leads to much shorter run times forwaicOcc()
compared to previous versions.  All
fitted.*()
functions now return both the fitted values and the estimated detection probability samples from a fittedspOccupancy
model.  Improved error handling for models with missing values and random effects.
 Added the argument
ignore.RE
to allpredict()
functions. If nonspatial random intercepts are included when fitting the model, settingignore.RE = TRUE
will yield predictions that ignore the values of the random effects. Ifignore.RE = FALSE
, the model will predict new values using the random intercepts for both sampled and nonsampled levels of the effects.  Fixed a bug in the crossvalidation component of all
spOccupancy
model fitting functions that occurred when random effects were included in the occurrence and/or detection component of the model.  Fixed minor bug in
simOcc()
andsimMsOcc()
that prevented simulating data with multiple random intercepts on detection.  Fixed minor bug in spatiallyexplicit models that resulted in an error when setting
NNGP = FALSE
and not specifying initial values for the spatial range parameterphi
.  Fixed a bug in the
predict()
functions forspMsPGOcc
andspPGOcc
objects that resulted in potentially inaccurate predictions whenn.omp.threads
> 1.
spOccupancy 0.2.1
CRAN release: 20220107
 Minor changes related to arguments in C++ code in header files to pass CRAN additional issues.
spOccupancy 0.2.0
CRAN release: 20211219
 Added an
n.chains
argument to all modelfitting functions for running multiple chains in sequence.  Added posterior means, standard deviations, GelmanRubin diagnostic (Rhat) and Effective Sample Size (ESS) to
summary
displays for each modelfitting function.  Fixed spatiallyexplicit
predict
functions to return occurrence probabilities at sampled sites instead of NAs.