intMsPGOcc()
. This fits a single-season version of the
“intgrated community occupancy model” from Doser
et al. 2022. The function intMsPGOcc()
should be
considered experimental
and is still under development. We have done adequate testing of the
function and users can be confident the resulting estimates are correct.
Rather, we consider this “experimental” because it lacks all the
functionality currently supported for other spOccupancy
model types. In particular, intMsPGOcc
model objects do not
currently work with ppcOcc()
(posterior predictive checks),
fitted()
(generated fitted values), or k-fold
cross-validation, and there may be specific data set situations that
cause the function to break. Please contact us if you use the function
and have any feedback or run into any problems. We are in active
development of the associated spatial versions of the function (both
without spatial factors and with spatial factors), as well as the above
mentioned limitations. intMsPGOcc()
does not currently
support random effects in the detection models, which we are actively
working on. See vignette("integratedMultispecies")
for more
details.postHocLM()
. The function
postHocLM()
fits a basic linear (mixed) model to a response
variable that is assumed to come from a previous model fit, and thus
each value in the data response variable has a full set of posterior
MCMC samples associated with it. While this function can be used for a
variety of situations (including objects that don’t come from
spOccupancy
), postHocLM()
may be particularly
useful for use with multi-species occupancy models to explore
associations between species-specific covariate effect estimates from a
multi-species occupancy model with species-level covariates, while fully
accounting for uncertainty in the estimates. A vignette displaying how
to do this will be posted in the coming months, but see the
documentation for the function for basic instructions on how to use the
function.sfMsPGOcc()
to allow a half-t prior on the
community-level variance parameters. See documentation for more
information on how to specify this. All multi-species occupancy model
fitting functions will eventually be updated to allow for this prior,
which can be a less informative prior when sample sizes (i.e., the
number of species in this case) is low.intPGOcc()
and spIntPGOcc()
to
remove an error that may occur if a data set only has site level
detection covariates.getSVCSamples()
to eliminate errors that
prevented the function from working under certain circumstances
depending on which covariates in the design matrix were modelled as
spatially-varying coefficients.tPGOcc()
and stPGOcc()
to
eliminate an error that occurred when trying to run these models with
single-visit data sets.mis.spec.type
and scale.param
arguments to the simTOcc()
function to simulate
multi-season detection-nondetection data under varying forms of model
mis-specification. See simTOcc()
documentation for detials.
Thanks to Sara Stoudt for her help with this.ppcOcc()
from working when
there were only site-level random effects on detection. This also
sometimes caused problems with cross-validation functionality as well.
Thanks to Jose Luis Mena for bringing this to my attention.spOccupancy v0.5.2 contains an important bug fix in the
cross-validation functionality for single-season occupancy models with
unbalanced sampling across replicates in the data set. Specifically, the
reported cross-validation deviance metrics may be inaccurate when one or
more sites had a detection history where a missing value came before a
non-missing value. For example, if one or more sites had a detection
history of c(NA, 1, 0, 0, 1)
, this would lead to the
problem occurring, but this would not occur if all missing values were
at the end of the detection history (e.g.,
c(1, 0, 0, 1, NA)
). The affected functions include the
following: PGOcc()
, spPGOcc()
,
msPGOcc()
, spMsPGOcc()
,
lfMsPGOcc()
, sfMsPGOcc()
,
intPGOcc()
, spIntPGOcc()
. We strongly
encourage users who have performed cross-validation with these models
and unbalanced sampling across replicates in the manner described to
rerun their analyses using v0.5.2. We apologize for any troubles this
has caused.
spOccupancy v0.5.0 contains numerous substantial updates that provide new functionality, improved run times for models with unstructured random effects, an important bug fix for cross-validation with unstructured random effects under certain scenarios, and some other minor bug fixes. The changes include:
svcPGOcc()
fits a
single-season spatially-varying coefficient model, and
svcTPGOcc()
fits a multi-season spatially-varying
coefficient model. We also include the functions
svcPGBinom()
and svcTPGBinom()
for fitting
spatially-varying coefficient generalized linear models when ignoring
imperfect detection. We also include the helper function
getSVCSamples()
to more easily extract the SVC samples from
the resulting model objects if they are desired.C++
code to reduce run times for
models that include unstructured random intercepts.k.fold.only
argument to all model-fitting
functions, which allows users to only perform k-fold cross-validation
instead of having to run the model first with the entire data set.X.0
was supplied as a data frame and not a
matrix. See GitHub issue
13.tPGOcc()
and stPGOcc()
.fitted()
functions for all spOccupancy model objects. See
this Github
issue for more details.ignore.RE = TRUE
.waicOcc()
for integrated models
(intPGOcc()
and spIntPGOcc()
) that sometimes
resulted in incorrect estimates of WAIC for data sets other than the
first data set. We strongly encourage users who have used
waicOcc()
with an integrated model to rerun their analyses
using v0.3.2.predict()
on a
spatially-explicit model with non-spatial random effects in the
occurrence portion of the model to rerun their analyses using
v0.3.2.intPGOcc()
and
spIntPGOcc()
that were accidentally introduced in v0.3.0.
See this
Github issue for more details.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:
lfMsPGOcc()
and sfMsPGOcc()
.
We also included the functions lfJSDM()
and
sfJSDM()
which are more typical joint species distribution
models that fail to explicitly account for imperfect detection.predict()
functions for single-species and
multi-species models now include the argument type
, which
allows for prediction of detection probability
(type = 'detection'
) at a set of covariate values as well
as predictions of occurrence (type = 'occupancy'
).like.samples
in the resulting model object, which contains
model likelihood values needed for calculation of WAIC. This leads to
much shorter run times for waicOcc()
compared to previous
versions.fitted.*()
functions now return both the fitted
values and the estimated detection probability samples from a fitted
spOccupancy
model.ignore.RE
to all
predict()
functions. If non-spatial random intercepts are
included when fitting the model, setting ignore.RE = TRUE
will yield predictions that ignore the values of the random effects. If
ignore.RE = FALSE
, the model will predict new values using
the random intercepts for both sampled and non-sampled levels of the
effects.spOccupancy
model fitting functions that occurred when
random effects were included in the occurrence and/or detection
component of the model.simOcc()
and simMsOcc()
that prevented simulating data with multiple random intercepts on
detection.NNGP = FALSE
and not specifying initial
values for the spatial range parameter phi
.predict()
functions for
spMsPGOcc
and spPGOcc
objects that resulted in
potentially inaccurate predictions when n.omp.threads
>
1.n.chains
argument to all model-fitting
functions for running multiple chains in sequence.summary
displays
for each model-fitting function.predict
functions to return
occurrence probabilities at sampled sites instead of NAs.spOccupancy
.