R/fitted.robmixglm.R

Defines functions fitted.robmixglm

Documented in fitted.robmixglm

fitted.robmixglm <- function(object, ...) {
  if (!inherits(object, "robmixglm"))
    stop("Use only with 'robmixglm' objects.\n")
    lp <- object$X %*% matrix(coef(object),ncol=1) + object$offset
  out <- switch (
    object$family,
    gaussian = lp,
    binomial = 1.0/(1.0+exp(-lp)),
    poisson = exp(lp),
    gamma = exp(lp),
    truncpoisson = exp(lp),
    nbinom = exp(lp)
  )
  return(out)
}

Try the robmixglm package in your browser

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

robmixglm documentation built on May 9, 2022, 9:08 a.m.