| Statistics Toolbox | Search  Help Desk |
| ridge | Examples See Also |
Parameter estimates for ridge regression.
Syntax
b = ridge(y,X,k)
Description
b = ridge(y,X,k) returns the ridge regression coefficients, b.
Given the linear model y = X
+
is: 
k = 0, b is the least squares estimator. For increasing k, the bias of b increases, but the variance of b falls. For poorly conditioned X, the drop in the variance more than compensates for the bias.
Example
This example shows how the coefficients change as the value ofk increases, using data from the hald dataset.
load hald;
b = zeros(4,100);
kvec = 0.01:0.01:1;
count = 0;
for k = 0.01:0.01:1
count = count + 1;
b(:,count) = ridge(heat,ingredients,k);
end
plot(kvec',b'),xlabel('k'),ylabel('b','FontName','Symbol')
See Also
regress,stepwise