R/coef.robmixglm.R

Defines functions coef.robmixglm

Documented in coef.robmixglm

coef.robmixglm <- function(object, ...) {
  if (!inherits(object, "robmixglm"))
    stop("Use only with 'robmixglm' objects.\n")
  res <- switch (
    object$family,
    gaussian = object$fit@coef[1:(length(object$fit@coef)-3)],
    binomial = object$fit@coef[1:(length(object$fit@coef)-2)],
    poisson = object$fit@coef[1:(length(object$fit@coef)-2)],
    gamma = object$fit@coef[1:(length(object$fit@coef)-3)],
    truncpoisson = object$fit@coef[1:(length(object$fit@coef)-2)],
    nbinom = object$fit@coef[1:(length(object$fit@coef)-3)]
    )
    names(res) <- object$coef.names[1:length(res)]
    res
}

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.