Regress::RidgeRegress Function

void RidgeRegress(TVec *Y, TMtx *A, double k, TVec *b, bool Normalize = true);

Regression by using "ridge" regression method.

#NameTypeDescription
1YTVec *
2ATMtx *
3kdouble
4bTVec *
5Normalize = truebool
Remarks:

Calculates regression coefficients b by using "ridge regression" method. When data suffers from multicollinearity one of the available methods which can still be used is ridge regression. In this case least squares estimates are unbiased, but their variances are large so they may be far from the true value. By adding a degree of bias to the regression estimates, ridge regression reduces the standard errors. It is hoped that the total effect will be to give more reliable estimates. Ridge regression uses following model:

y = A*b ,

where y is vector of observations, A matrix of independent variables and b are regression coefficients. Additional k parameter is the so called "ridge parameter". Regression coefficients are then calculated from the following formula:

b = inv(AT*A + k*I) * (AT*y),

where I is the identity matrix, A matrix of independent variables and AT=Transp(A).

Note
The routine does NOT calculate optimal k value for ridge regression.

Declared in Dew::Stats::Units::Regress · Dew.Stats/Units.Regress.h · Cross-compiler