Description Usage Arguments Value Functions References Examples
Dunn-Smyth Residuals for Detection and Occupancy for Fitted Models
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
)
|
fit |
A fitted occupancy-detection model. |
type |
The type of point estimate to use for parameter estimates. See |
seed |
A seed to fix randomness of Dunn-Smyth residual jitter. |
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.
ds_detection_residuals.fit
: Given a fitted occupancy detection model (variable names must match). Computes Dunn-Smyth residuals for detection, marginalising the latent variables.
ds_occupancy_residuals.fit
: Given a fitted occupancy detection model (variable names must match).
Computes Dunn-Smyth residuals for occupancy, marginalising the latent variables.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.