R/varCheck.vglm.R

Defines functions varCheck.vglm

varCheck.vglm <- function(model, xlab, ylab, pch, ...) {
  
  if(missing(xlab)) xlab <- expression(mu)
  if(missing(ylab)) ylab <- 'squared Pearson residuals'
  if(missing(pch)) pch <- 16
  
  r.p <- (residuals(model, type = 'pearson')[,1])^2
  y.hat <- fitted(model)[,1]
  plot(y.hat, r.p, pch = 16, xlab = xlab, ylab = ylab, ...)
}
reealpeppe/glmdiag documentation built on Dec. 22, 2021, 2:06 p.m.