lm_multiv_ridge: Multivariate Ridge Regression

View source: R/lm_multiv_ridge.R

lm_multiv_ridgeR Documentation

Multivariate Ridge Regression

Description

Estimate regression coefficients by using ridge regression.

Usage

lm_multiv_ridge(Y, X, lambda = 0, do_scale = FALSE)

Arguments

Y

An N x K matrix of dependent variables.

X

An N x M matrix of regressors.

lambda

Numeric vector of lambda values

do_scale

If true, X is centered and scaled, and Y is centered.

Details

Consider the multivariate regression:

\mathbf{Y} = \mathbf{X \Psi} + \mathbf{e}.

\mathbf{\Psi} is a M-by-K matrix of regression coefficients. The ridge regression estimate for the coefficients is

\mathbf{\Psi} = (\mathbf{X'X} + \lambda \mathbf{I})^{-1} \mathbf{X'Y}.

Value

A list object with the components: 1) Psi - A list of estimated \mathbf{\Psi} matrices, 2) lambda - A vector of \lambda values, 3) GCV - A vector of GCV values

References

G. H. Golub, M. Heath, G. Wahba (1979). Generalized cross-validation as a method for choosing a good ridge parameter. Technometrics 21(2), 215-223. doi: 10.2307/1268518


VARshrink documentation built on Jan. 10, 2026, 1:06 a.m.