New Contributor
Posts: 4

# getting coeffecients in ridge regression analysis with modified lambda

Dear community members,

I am using PROC REG with the REG= option to obtain a ridge regression. I have done the following;

Plotted the ridge estimates against λ.

Chosen λ for which the coefficient estimates are not rapidly changing and have sensible signs.

I know this method ‎has no specific objective basis and is heavily criticised by others.

However my question is as follows, how can I get the p values, t values and standard errors for my  selected choice of  λ ? I seem only to get the ‎regression coefficients which are different from the ridge regression that was un tuned for ‎λ.‎

Any help will be greatly appreciated

Best ,
Ka‎
Super User
Posts: 23,662

## Re: getting coeffecients in ridge regression analysis with modified lambda

https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

See the examples above with the instructions on how to save statistics and output.

kwa wrote:
Dear community members,

I am using PROC REG with the REG= option to obtain a ridge regression. I have done the following;

Plotted the ridge estimates against λ.

Chosen λ for which the coefficient estimates are not rapidly changing and have sensible signs.

I know this method ‎has no specific objective basis and is heavily criticised by others.

However my question is as follows, how can I get the p values, t values and standard errors for my  selected choice of  λ ? I seem only to get the ‎regression coefficients which are different from the ridge regression that was un tuned for ‎λ.‎

Any help will be greatly appreciated

Best ,
Ka‎

New Contributor
Posts: 4

## getting coeffecients in ridge regression analysis with modified lambda

Dear community members,
I am using PROC REG with the REGo= option to obtain a ridge regression. I have done the following;

Plotted the ridge estimates against λ.

Chosen λ for which the coefficient estimates are not rapidly changing and have sensible signs.

I know this method ‎has no specific objective basis and us heavily criticised by others.

However my question is as follows, how can I get the p values, t values andd Standard errors for my  selected choice of  λ ? I seem only to get the regression coefficients

Any help will be greatly appreciated

Best
Kw
New Contributor
Posts: 4

## Re: getting coeffecients in ridge regression analysis with modified lambda

Thank you reeza. Would anyone know the specific code in proc reg to get the p values, t values andd Standard errors for my  selected choice of  λ ?
Super User
Posts: 23,662

## Re: getting coeffecients in ridge regression analysis with modified lambda

We can’t see your code so at this point probably not. Please post your code.

The instructions on in the l8nk have enough information to show you how to obtain the values. Include what you’ve tried so far as well.

SAS Super FREQ
Posts: 4,237

## Re: getting coeffecients in ridge regression analysis with modified lambda

You can use the OUTSEB option to get the standard errors for the RIDGE estimates in the outest= data set:. However, I don't think the estimates follow a t distribution, so you don't get test statistics or p-values. If you want p-values, I think you will need to bootstrap.

The estimates are biased, so it's not clear to me that the p-values will be useful.

``````proc reg outest=est ridge=0.02 outseb;
model Y=x1 x2 x3 ;
run;

proc print data=est(where=(_TYPE_ contains "RIDGE"));
run;``````

SAS Super FREQ
Posts: 4,237

## Re: getting coeffecients in ridge regression analysis with modified lambda

You can use the OUTSEB option to get the standard errors for the RIDGE estimates in the outest= data set:. However, I don't think the estimates follow a t distribution, so you don't get test statistics or p-values. If you want p-values, I think you will need to bootstrap.

The estimates are biased, so it's not clear to me that the p-values will be useful.

``````proc reg outest=est ridge=0.02 outseb;
model Y=x1 x2 x3 ;
run;

proc print data=est(where=(_TYPE_ contains "RIDGE"));
run;``````

Discussion stats
• 6 replies
• 195 views
• 0 likes
• 3 in conversation