ds_detection_residuals.fit | R Documentation |
Dunn-Smyth Residuals for Detection and Occupancy for Fitted Models
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.
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) fitold <- readRDS("../Experiments/7_4_modelrefinement/fittedmodels/7_4_13_allhyp_vif_logwoody500m_msnm_year_Time_Wind.rds") fit <- translatefit(fitold) ds_detection_residuals.fit(fit) ds_occupancy_residuals.fit(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.