R/coef.liu.R

Defines functions coef.liu

Documented in coef.liu

coef.liu <- function(object, ...) {
  scaledcoef <- t(as.matrix(object$coef / object$xscale))
  if (object$Inter) {
    inter <- mean(object$mf[,1]) - scaledcoef %*% object$xm
    scaledcoef <- cbind(Intercept = inter, scaledcoef)
    colnames(scaledcoef)[1] <- "Intercept"
  }else{
    scaledcoef <- t(as.matrix(object$coef / object$xscale))
  }

  drop(scaledcoef)
}

Try the liureg package in your browser

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

liureg documentation built on July 28, 2026, 9:09 a.m.