rqresiduals: Randomized quantile resiudals for binomial N-mixture models.

Description Usage Arguments Value Examples

View source: R/rqRes.r

Description

Computes three types of randomized quantile residuals for binomial N-mixture models.

Usage

1
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

1
2
3
4
5
6
7
8
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))

nmixgof documentation built on May 2, 2019, 6:41 a.m.