v0.7.0
spOccupancy v0.7.0 contains a variety of substantial updates, most notably functionality for fitting non-spatial and spatial multi-species multi-season occupancy models, as well as multi-species spatially-varying coefficient models. There are also a variety of smaller bug fixes/additional error handling that will help eliminate some common hard-to-interpret errors that users encountered. This version will be sent to CRAN on August 16, 2023.
- New functionality for fitting multi-species, multi-season occupancy models. The function
tMsPGOcc()
fits non-spatial, multi-season, multi-species occupancy models, and the functionstMsPGOcc()
fits spatial, multi-season occupancy models. The spatially-explicit function also inherently accounts for species correlations with a spatial factor modeling approach (e.g., they are joint species distribution models with imperfect detection and species correlations). See Doser et al. 2023 for statistical details on the spatial factor modeling approach. A vignette will be posted that details fitting these models in depth in the coming months, but the syntax is essentially a combination of multi-species models (e.g.msPGOcc()
,sfMsPGOcc()
) and multi-season single-species models (i.e.,tPGOcc()
andstPGOcc()
), so the recommendations provided in the vignettes for those models is applicable for these models as well. - New functionality for multi-species spatially-varying coefficient occupancy models for single-season (
svcMsPGOcc()
) and multi-season (svcTMsPGOcc()
) models. These approaches use a spatial factor modeling approach for each of the SVCs to make the models relatively computationally efficient. The functions inherently account for species correlations. The vignette on spatially-varying coefficients provides an example forsvcMsPGOcc()
, with an example forsvcTMsPGOcc()
coming soon. - The function
simTMsOcc()
simulates multi-season, multi-species occupancy models. - Updated
getSVCSamples()
to now work with multi-species spatially-varying coefficient models. - Added in a new check in all spatially-explicit models to see if all the spatial coordinates in the
data$coords
object were unique, as this is a requirement forspOccupancy
spatially-explicit models. In previous versions, this resulted in an error ofc++ error: dpotrf failed
, or something along those lines, which was a common source of confusion. - Updated all model fitting functions to avoid running for a long time, just to eventually crash. Now, if trying to run models and save an object that is too large for memory, R should crash at the beginning. This occurred in situations where the
n.burn
argument was greater than 0 and/orn.thin
was greater than 1. Thanks to Alex Bacjz for bringing this to my attention. - Added in the
by.sp
argument towaicOcc()
to allow users to calculate WAIC separately for individual species in all multi-species model types inspOccupancy
. - Minor updates to multiple vignettes to reflect changes since their original versions.