Slab and Shrinkage Linear Regression Estimation
savvySh.RdThis function estimates coefficients in a linear regression model using several shrinkage methods, including Multiplicative Shrinkage, Slab Regression, Linear shrinkage, and Shrinkage Ridge Regression. Each method gives estimators that balance bias and variance by applying shrinkage to the ordinary least squares (OLS) solution. The shrinkage estimators are computed based on different assumptions about the data.
Usage
savvySh(x, y, model_class = c("Multiplicative", "Slab", "Linear", "ShrinkageRR"),
v = 1, lambda_vals = NULL, nlambda = 100, folds = 10,
foldid = FALSE, include_Sh = FALSE, exclude = NULL)Arguments
- x
A matrix of predictor variables.
- y
A vector of response variable.
- model_class
A character string specifying the shrinkage model to use. Options can choose from
"Multiplicative","Slab","Linear", and"ShrinkageRR". The default is"Multiplicative". If the user supplies more than one model, a warning is issued and only the first option is used.- v
A numeric value controlling the strength of shrinkage for the
SRestimator in the"Slab"model. Must be a positive number. Default is 1.- lambda_vals
A vector of
lambdavalues forRR. This is used only when multicollinearity (rank deficiency) is detected and"ShrinkageRR"is not selected. IfNULL, a default sequence is used.- nlambda
The number of
lambdavalues to use for cross-validation iflambda_valsisNULL. Only used when multicollinearity is present and"ShrinkageRR"is not called. The default is100.- folds
Number of folds for cross-validation in
RR. This is applicable only if multicollinearity occurs and"ShrinkageRR"is not chosen. The default is10and must be an integer>= 3.- foldid
Logical. If
TRUE, saves the fold assignments in the output when multicollinearity is detected and"ShrinkageRR"is not used. The default isFALSE.- include_Sh
Logical. If
TRUE, includes the Sh estimator in the"Multiplicative"model. The default isFALSE.- exclude
A vector specifying columns to exclude from the predictors. The default is
NULL.
Value
A list containing the following elements:
- call
The matched function call.
- model
The data frame of
yandxused in the analysis.optimal_lambdaIf
xis full rank, this value is0. Ifxis rank-deficient, it is the chosenRRlambdafrom cross-validation.- model_class
The selected model class.
- coefficients
A list of estimated coefficients for each applicable estimator in the
model_class.- fitted_values
A list of fitted values for each estimator.
- pred_MSE
A list of prediction MSEs for each estimator.
- ridge_results (optional)
A list containing detailed results from
RR, used when multicollinearity (rank deficiency) is detected inxand the"ShrinkageRR"is not called. This element is included only whenRRis applied instead ofOLSdue to the rank deficiency ofx. It contains:lambda_rangeThe range of
lambdavalues used in theRRcross-validation.cvmA vector of cross-validated MSEs for each
lambdainlambda_range.cvsdThe standard deviation of the cross-validated MSEs for each
lambda.ridge_coefficientsA matrix of coefficients from
RRat eachlambdavalue, with each column representing the coefficients corresponding to a specificlambda.
Details
The Slab and Shrinkage Linear Regression Estimation methodology provides four classes of shrinkage estimators
that reduce variance in the OLS solution by introducing a small, structured bias. These methods handle overfitting,
collinearity, and high-dimensional scenarios by controlling how and where the coefficients are shrunk. Each class offers a distinct strategy
for controlling instability and improving mean squared error (MSE) in linear models, tailored for different modeling contexts specified
in the model_class argument. Note that if the user provides more than one option in model_class, only the first option is used,
and a warning is issued.
Model Classes:
- Multiplicative Shrinkage:
This class includes three estimators that use the
OLScoefficients as a starting point and apply multiplicative adjustments:St -Stein estimator, which shrinks all coefficients toward zero by a single global factor. This aims to reduce MSE while keeping the overall bias fairly uniform across coefficients.
DSh -Diagonal Shrinkage, assigning an individual factor to each coefficient based on its variance. This yields more targeted shrinkage than the global approach and often achieves a lower MSE.
Sh -Shrinkage estimator that solves a Sylvester equation for a full (non-diagonal) shrinkage matrix. It is more flexible but also more computationally demanding. Included only if
include_Sh = TRUE.
- Slab Regression:
Slab Regression applies an adaptive quadratic penalty term to the
OLSobjective:SR -Simple Slab Regression, which modifies the
OLSobjective by adding a penalty in a fixed direction (often the constant vector). This penalty is controlled byvand does not require cross-validation. It can be viewed as a special case of thegeneralized lassobut focuses on smooth (quadratic) rather than \(\ell_1\) regularization.GSR -Generalized Slab Regression, extending SR by allowing shrinkage along multiple directions. Typically, these directions correspond to the eigenvectors of the design covariance matrix, effectively shrinking principal components.
- Linear Shrinkage:
The Linear Shrinkage (LSh) estimator forms a convex combination of the OLS estimator (through the origin) and a target estimator that assumes uncorrelated predictors (diagonal approximation of the covariance). This approach is simpler than a full matrix method and is well-suited for standardized data where the intercept is not needed.
- Shrinkage Ridge Regression:
The Shrinkage Ridge Regression (SRR) extends standard
RRby shrinking the design covariance matrix toward a spherical target (i.e., a diagonal matrix with equal entries). This additional regularization stabilizes the eigenvalues and yields more robust coefficient estimates, particularly when the predictors lie close to a low-dimensional subspace.
References
Asimit, V., Cidota, M. A., Chen, Z., & Asimit, J. (2025). Slab and Shrinkage Linear Regression Estimation. Retrieved from https://openaccess.city.ac.uk/id/eprint/35005/