R/rscale.glm.R

Defines functions rscale.glm

Documented in rscale.glm

rscale.glm <-
function(object)
 {
  famname <- object$family["name"]
  if(is.null(famname)) famname <- "Gaussian"
  z <- 1
  if (famname!="Poisson" && famname !="Binomial")
        { resid <- object$residuals
          n <- length(resid)
          p <- object$rank
          rdf <- object$df.resid
          if(is.null(rdf)) rdf <- n - p
          z <- sum(resid^2)/rdf}
 names(z) <- famname
 class(z) <- "glm.i"
 z}

Try the robcbi package in your browser

Any scripts or data that you put into this service are public.

robcbi documentation built on Aug. 22, 2023, 1:06 a.m.