DunnSmythResidualsRaw: Dunn-Smyth Residuals for Detection and Occupancy for Given...

Description Usage Arguments Value Functions References

Description

Dunn-Smyth Residuals for Detection and Occupancy for Given Precalculated Predictions of Probabilities

Usage

1
2
3
4
5
6
7
8
9
cdfvals_2_dsres_discrete(cdf, cdfminus, seed = NULL)

numdet_pdf(x, pDetected)

numdet_cdf(x, pDetected)

ds_detection_residuals.raw(preds, obs, seed = NULL)

ds_occupancy_residuals.raw(preds, obs, seed = NULL)

Arguments

cdf

The CDF of a discrete random variable evaluated at observations of iid copies of this random variable. Must be a list or vector.

cdfminus

For observations of iid copies of a discrete random variable, the CDF of the random variable evaluated at the value just below the observed values. Must be a list or vector of same length as cdf.

x

Is the value at which to evaluate the pdf

pDetected

Is a list of the detection probabilities for each visit to the ModelSite for a single species

preds

is a dataframe with columns Species, ModelSite, pOccupancy, and pDetected_cond. pOccupancy is the probability of ModelSite being occupied. pDetected_cond is the probability of detecting the species, given the species occupies the ModelSite.

obs

is a dataframe with columns Species, ModelSite, and Detected

fit

Is a runjags object created by fitting using package runjags.

Value

A dataframe with a columns for Species, ModelSite, and detection residual. The residual is only computed for species detected at least once at a site.

A dataframe with a columns for Species, ModelSite, and occupancy residual.

Functions

References

D. I. Warton, J. Stoklosa, G. Guillera-Arroita, D. I. MacKenzie, and A. H. Welsh, "Graphical diagnostics for occupancy models with imperfect detection," Methods in Ecology and Evolution, vol. 8, no. 4, pp. 408-419, 2017, doi: 10.1111/2041-210X.12761.


sustainablefarms/linking-data documentation built on Oct. 28, 2020, 2:41 a.m.