rqresiduals {nmixgof} | R Documentation |
Randomized quantile resiudals for binomial N-mixture models.
Description
Computes three types of randomized quantile residuals for binomial N-mixture models.
Usage
rqresiduals(umFit, type = "marginal")
Arguments
umFit |
An object of class unmarkedFit from a model fitted using pcount. |
type |
The type of rq residuals to compute, one of 'marginal', 'site-sum' or 'observation'. |
Value
A matrix (if type
is 'marginal' or 'site-sum') or vector (for ) con.
Examples
library(unmarked)
umf = unmarkedFramePCount(y = shoveler$y, obsCovs = shoveler$obs, siteCovs = shoveler$site)
fmP = pcount(~scale(date) + scale(reedcover) ~ scale(log(water)) + scale(latitude),
data = umf, K = 80)
qqnorm(rqresiduals(fmP, "s"))
qqnorm(rqresiduals(fmP, "o"))
par(mfcol = c(3,4))
invisible(apply(rqresiduals(fmP, "m"), 2, qqnorm))
[Package nmixgof version 0.1.0 Index]