Compute Covariance Diagnostic for Lambda in N-mixture Models
Compute Covariance Diagnostic for Lambda in N-mixture Models
This function extracts the covariance diagnostic of Dennis et al. (2015) for lambda in N-mixture models (Royle 2004) of the unmarkedFitPCount class as well as in data frames of the unmarkedFramePcount class.
1.1
covDiag(object,...)## S3 method for class 'unmarkedFitPCount'covDiag(object,...)## S3 method for class 'unmarkedFramePCount'covDiag(object,...)
Arguments
object: an object of class unmarkedFitPCount or unmarkedFramePCount.
...: additional arguments passed to the function.
Details
This function extracts the covariance diagnostic developed by Dennis et al. (2015) for lambda in N-mixture models. Values <= 0 suggest sparse data and potential problems during model fitting. covDiag can take data frames of the unmarkedFramePcount
class as input. For convenience, the function also takes the repeated count model object as input, extracts the raw data, and computes the covariance diagnostic. Thus, different models on the same data set will have identical values for this covariance diagnostic.
Returns
covDiag returns a list with the following components:
cov.diag: the value of the covariance diagnostic.
message: a string indicating whether a warning was issued (i.e., "Warning: lambda is infinite, data too sparse") or not (i.e., NULL).
References
Dennis, E. B., Morgan, B. J. T., Ridout, M. S. (2015) Computational aspects of N-mixture models. Biometrics
71 , 237--246.
Royle, J. A. (2004) N-mixture models for estimating population size from spatially replicated counts. Biometrics 60 , 108--115.