R/influence_glm.R

Defines functions influence.spglm

Documented in influence.spglm

#' @rdname influence.spmodel
#' @method influence spglm
#' @order 3
#' @export
influence.spglm <- function(model, ...) {
  tibble::tibble(
    # allow ... so type.residuals can be passed to residuals()
    .resid = residuals(model, ...),
    .hat = hatvalues(model),
    .cooksd = cooks.distance(model),
    # standardized residuals always use their own default type regardless of
    # any type passed above, since standardization needs a specific residual definition
    .std.resid = residuals(model, type = "standardized")
  )
}

#' @rdname influence.spmodel
#' @method influence spgautor
#' @order 4
#' @export
influence.spgautor <- influence.spglm

Try the spmodel package in your browser

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

spmodel documentation built on Sept. 11, 2026, 1:07 a.m.