R/print.enetLTS.R

Defines functions print.enetLTS

Documented in print.enetLTS

print.enetLTS <-
   function(x,vers=c("reweighted","raw"),...){

      # require(enetLTS)
      # require(predict.enetLTS)
      # require(coef.enetLTS)

      vers <- match.arg(vers)
      cat("enetLTS estimator \n")

      cat("\nCall: ", deparse(x$call), "\n\n")

      coefficients <- drop(coef.enetLTS(x,vers=vers))
      cat("\nCoefficients:\n")
      print(unlist(coefficients))

      nCoefficients <- sum(unlist(coefficients)!=0)
      cat("\n number of the nonzero coefficients:\n")
      print(nCoefficients)

      cat("\n alpha:",x$alpha)
      cat("\n lambda:",x$lambda)
      cat("\n lambdaw:",x$lambdaw)

}

Try the enetLTS package in your browser

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

enetLTS documentation built on May 22, 2022, 1:05 a.m.