Extract Coefficients for a Slab and Shrinkage Linear Regression Model
coef.savvySh_model.RdExtracts the regression coefficients from a savvySh_model object. You may specify one or
more shrinkage estimators through the estimator parameter. If no estimator is specified,
the function returns coefficients for all available estimators as a named list.
Usage
# S3 method for class 'savvySh_model'
coef(object, estimator = NULL, ...)Arguments
- object
A fitted
savvySh_modelobject produced bysavvySh.- estimator
A character vector naming one or more estimators from which to extract coefficients. Valid names are those stored in
object$coefficients(e.g.,"St","DSh","Sh","SR","GSR", etc.). IfNULL, coefficients for all available estimators are returned.- ...
Additional arguments passed to
predict.savvySh_model.
Value
A named numeric vector of regression coefficients if a single estimator is specified, or a named list of such vectors if multiple estimators are requested.
Details
This function internally calls predict.savvySh_model with type = "coefficients"
to retrieve the desired coefficient estimates. If multiple estimators are requested (or if none is specified,
in which case all are returned), the output is a named list in which each element is a numeric vector of coefficients.
The coefficient vectors are named according to whether an intercept is present (for Linear shrinkage, no intercept).
If a single estimator is specified, a single named numeric vector is returned.
See also
predict.savvySh_model for generating predictions,
savvySh for fitting slab and shrinkage linear models.