plotqrrvglm: Model Diagnostic Plots for QRR-VGLMs

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/plot.vgam.R

Description

The residuals of a QRR-VGLM are plotted for model diagnostic purposes.

Usage

1
2
3
4
5
plotqrrvglm(object, rtype = c("response", "pearson", "deviance", "working"),
            ask = FALSE,
            main = paste(Rtype, "residuals vs latent variable(s)"),
            xlab = "Latent Variable",
            I.tolerances = object@control$eq.tolerances, ...)

Arguments

object

An object of class "qrrvglm".

rtype

Character string giving residual type. By default, the first one is chosen.

ask

Logical. If TRUE, the user is asked to hit the return key for the next plot.

main

Character string giving the title of the plot.

xlab

Character string giving the x-axis caption.

I.tolerances

Logical. This argument is fed into Coef(object, I.tolerances = I.tolerances).

...

Other plotting arguments (see par).

Details

Plotting the residuals can be potentially very useful for checking that the model fit is adequate.

Value

The original object.

Note

An ordination plot of a QRR-VGLM can be obtained by lvplot.qrrvglm.

Author(s)

Thomas W. Yee

References

Yee, T. W. (2004). A new technique for maximum-likelihood canonical Gaussian ordination. Ecological Monographs, 74, 685–701.

See Also

lvplot.qrrvglm, cqo.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# QRR-VGLM on the hunting spiders data
# This is computationally expensive
set.seed(111)  # This leads to the global solution
hspider[, 1:6] <- scale(hspider[, 1:6])  # Standardize environ vars
p1 <- cqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute, Arctperi,
                Auloalbi, Pardlugu, Pardmont, Pardnigr, Pardpull,
                Trocterr, Zoraspin) ~
          WaterCon + BareSand + FallTwig + CoveMoss + CoveHerb + ReflLux,
          poissonff, data = hspider, Crow1positive = FALSE)
par(mfrow = c(3, 4))
plot(p1, rtype = "response", col = "blue", pch = 4, las = 1, main = "")

## End(Not run)

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.