
Occupancy and detection residuals for PGOcc models
residuals.PGOcc.RdMethod for calculating occupancy and detection residuals for single-species occupancy models (PGOcc) following the approach of Wright et al. (2019).
Usage
# S3 method for PGOcc
residuals(object, n.post.samples = 100, ...)Arguments
- object
object of class
PGOcc.- n.post.samples
the number of posterior MCMC samples to calculate the residuals for. By default this is set to 100. If set to a value less than the total number of MCMC samples saved for the model, residuals will be calculated for a random subset of the total MCMC samples. Maximum value is the total number of MCMC samples saved.
- ...
currently no additional arguments
References
Wright, W. J., Irvine, K. M., & Higgs, M. D. (2019). Identifying occupancy model inadequacies: can residuals separately assess detection and presence?. Ecology, 100(6), e02703.
Author
Jeffrey W. Doser doserjef@msu.edu
Value
A list comprised of:
- occ.resids
a matrix of occupancy residuals with first dimension equal to
n.post.samplesand second dimension equal to the number of sites in the data set.- det.resids
a three-dimensional array of detection residuals with first dimension equal to
n.post.samples, second dimension equal to the number of sites in the data set, and third dimension equal to the maximum number of repeat visits. Note detection residuals are only calculated for a given site and MCMC iteration when the species is present.