R/coef.liu.R

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 May 2, 2019, 8:34 a.m.