Print a Slab and Shrinkage Model Summary
print.savvySh_model.Rd
Displays a concise summary of a fitted savvySh_model
object, including the original
function call, the chosen model class, the number of non-zero coefficients per estimator,
and the optimal lambda
value (if applicable). Additionally, it prints the coefficients for
the specified estimator(s) with user-specified precision.
Arguments
- x
A fitted
savvySh_model
object returned bysavvySh
.- digits
An integer specifying the number of significant digits to display when printing coefficients and
lambda
. Defaults tomax(3, getOption("digits") - 3)
.- estimator
A character vector naming one or more estimators for which coefficients should be printed. Valid names are those present in
x$coefficients
(e.g.,"St"
,"DSh"
,"Sh"
,"SR"
,"GSR"
, or"ShrinkageRR"
). IfNULL
, coefficients for all estimators are printed.- ...
Additional arguments passed to
print
(currently unused).
Value
Invisibly returns a data.frame
summarizing each selected estimator's name, number of non-zero
coefficients, and the final optimal_lambda
(if any).
Details
This print method provides a quick diagnostic of the fitted model by showing:
- Summary Metrics
A table that includes, for each estimator, the number of non-zero coefficients and the optimal
lambda
(if applicable).- Coefficients
For each selected estimator, the coefficients are printed with appropriate names: if an intercept is present, it is labeled
(Intercept)
and the remaining coefficients are labeled according to the predictor names.
If the user does not specify an estimator using the estimator
argument, the function prints
information for all available estimators stored in the model. If one or more estimators are specified,
only those are printed, after verifying that they exist in x$coefficients
.
The method invisibly returns a summary data.frame
containing key metrics for each estimator.
See also
savvySh
for fitting slab and shrinkage linear models,
coef.savvySh_model
and predict.savvySh_model
for extracting coefficients
and generating predictions.