DunnSmythResiduals: Dunn-Smyth Residuals for Detection and Occupancy for Fitted...

Description Usage Arguments Value Functions References Examples

Description

Dunn-Smyth Residuals for Detection and Occupancy for Fitted Models

Usage

1
2
3
4
5
6
7
8
ds_detection_residuals.fit(fit, type = "median", seed = NULL)

ds_occupancy_residuals.fit(
  fit,
  type = "median",
  seed = NULL,
  conditionalLV = TRUE
)

Arguments

fit

A fitted occupancy-detection model.

type

The type of point estimate to use for parameter estimates. See get_theta

seed

A seed to fix randomness of Dunn-Smyth residual jitter.

Value

A matrix, each row is a ModelSite and each column is a species. Detection residuals are only computed for species and sites that have at least one detection. Other values are NA.

A matrix, each row is a ModelSite and each column is a species.

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.

Examples

1
2
3
fit <- readRDS("./tmpdata/7_2_10_clim_year.rds")
detection_resids <- ds_detection_residuals.fit(fit, type = "median")
occupancy_resids <- ds_occupancy_residuals.fit(fit, type = "median", conditionalLV = FALSE)

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