R/print.ridgereg.R

Defines functions print.ridgereg

Documented in print.ridgereg

#' Print information from a ridgereg object
#' @description \code{print} prints the formula and the coefficients from a ridgereg object.
#' @param x A ridgereg object.
#' @param ... Further arguments passed to or from other methods.
#' @return Prints the formula and the coefficients.
#' @examples
#' print(ridgereg(Petal.Length ~ Species, data = iris, lambda = 0))
#' @export
#'

# print
print.ridgereg <- function(x, ...) {
  cat("\nCall:\n", deparse(x$call_arg), "\n\nCoefficients:\n", sep = "")
  # coef(x)
  res <- c(x$beta_hat)
  names(res) <- rownames(x$beta_hat)
  print(res)
}
Sidryd/lab4sidjac documentation built on Oct. 17, 2020, 11:05 p.m.