R/coef.ridgereg.R

Defines functions coef.ridgereg

Documented in coef.ridgereg

#' Return the coefficients of a ridgereg object
#' @description \code{coef} returns the coefficients of a ridgereg object.
#' @param object A ridgereg object.
#' @param ... Further arguments passed to or from other methods.
#' @return Return coefficients.
#' @examples
#' coef(ridgereg(formula = Petal.Length ~ Species, data = iris, lambda = 0))
#' @export

# coef
coef.ridgereg <- function(object, ...){
  res <- c(object[[4]])
  names(res) <- rownames(object[[4]])
  return(res)
}
Sidryd/lab4sidjac documentation built on Oct. 17, 2020, 11:05 p.m.