rqResObs_optim: Observation Randomized Quantile Residuals

Description Usage Arguments Value

View source: R/rqRes.R

Description

Calculates Observation Randomized-quantile residuals for a model fit with optim. As defined in Knape et al. 2018 and available for unmarked models in the nmixgof package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rqResObs_optim(
  n_obs,
  K,
  lambda_est,
  sigma_est = NA,
  W = NA,
  p_est = NA,
  y_list = NA,
  sampling_method,
  show.warnings = FALSE
)

Arguments

n_obs

a matrix of observed counts, with rows = sites and columns = replicates

K

maximum possible true mean abundance, N

lambda_est

estimated lambda (mean abundance across sites) from fitted model

sigma_est

estimated sigma from fitted model (only needed if distance sampling)

W

transect half-width. (only needed if distance sampling)

p_est

estimated mean (across distances = 0 to W) detection probability (only needed if point counts)

y_list

list of distance values with elements = sites and replicates elements within each element

sampling_method

either 'pointcount' or 'distance'

Value

a matrix of residuals with the same dimensions as the observations, n_obs.


philipshirk/nmmsims documentation built on Feb. 26, 2020, 11:27 a.m.