Page 1 of 4

Ridge (Ridge Regression and Ridge Trace)

Posted: Fri Jul 30, 2010 2:00 pm
by EViews Gareth
This thread is about the Ridge Add-in that performs Ridge regression.

Change log
  • 2010/07/30 - Initial release
  • 2011/03/11 - Fix for expression in dependent variables, and to provide a better error message in the case of perfect multicolinearity.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Tue Mar 08, 2011 10:56 am
by subbuteo1
Hello,

I am attempting to use the ridge regression and trace add-in for eviews 7. I keep getting the error: *variable is not defined in "!CVAL = 7.645... - @MEAN(*variable)*B(8)"

I understand this to be part of the RIDGE process but there is no reason for the variable not to be defined. I have tried taking variables out of the equation and it keeps coming up with this error for different variables. They all definitely exist in my workfile. The problem appears not to happen to the dummies though...
(cant post my workfile)

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Tue Mar 08, 2011 10:59 am
by EViews Glenn
What is " *variable " supposed to represent?

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Tue Mar 08, 2011 11:15 am
by subbuteo1
sorry, its just one of my regressors.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Tue Mar 08, 2011 12:09 pm
by EViews Gareth
I think that this means there's a singular matrix error in the calculations. Your regressors might be perfectly colinear. Try a different biasing constant (increase the value closer to 1).

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed Mar 09, 2011 11:22 am
by subbuteo1
With further playing around with other equations I believe that the add-in is unable to cope with series that are subjected to a function within the ridge. i.e. log(series1/series2). Obviously you can get around this by creating the transformed series first.

I haven't been able to get any of the equations I have tried (that definitely work when estimating using normal ls) without getting the error except ones without any transformations.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed Mar 09, 2011 11:53 am
by EViews Gareth
I can't replicate that (I was able to use log(x1/x2) as a regressor ok). However I did just notice that if you have "Y " as your dependent variable, rather than "Y" (i.e. you include a space), it will fail.

Edit: Ah, also, you cannot have expressions as the dependent variable, thus although you can have log(x1/x2) as a regressor, you cannot have it as the dependent variable.

I'll see if we can update it a bit in the future.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Fri Mar 11, 2011 11:56 am
by EViews Gareth
A new version that should fix that has been uploaded.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Tue May 17, 2011 5:45 pm
by stasibab
About the ridge regression, I see there is no ability for forecasting?

given the file attached

i put dependent lrcons
independent lrgdp lrprice

How about the bayesian constant?? Is this what we call constraint term in ridge regression? What values can it be?

What is the ridge trace ? I put the same variables and I get an error of negative square root!

Thank you in advance!

Ridge (Ridge Regression and Ridge Trace)

Posted: Tue May 17, 2011 6:57 pm
by EViews Gareth
There is no forecasting option in the add-in, although you could do it manually.

I'm on my phone at the moment, but the add-in documentation might discuss your other questions.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed May 18, 2011 3:52 am
by stasibab
Where can I find this documentation?

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed May 18, 2011 7:53 am
by EViews Gareth
Add-ins->Manage Add-ins. Then select the Ridge add-in and hit the "Docs" button.

Although having just looked at them, the docs don't go into too much detail, other than referring you to the book "Applied Linear Statistical Models" by Neter, Kutner, Nachtsheim and Wasserman.

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed May 18, 2011 10:23 am
by stasibab
EViews Gareth wrote:Add-ins->Manage Add-ins. Then select the Ridge add-in and hit the "Docs" button.

Although having just looked at them, the docs don't go into too much detail, other than referring you to the book "Applied Linear Statistical Models" by Neter, Kutner, Nachtsheim and Wasserman.


I went to the book but it is not very helpful.
After some search I found that the ridge trace is a plot of the regression coefficients as a function of the ridge parameters.

You can play in the ridge regression with the bayesian value and look at the different results.

When u say do the forecast manually you mean by Excel or is there a way with Eviews (like a command?)

The problem for me is that I am able run the ridge regression and get the coefficients. When I do the same to the trace I do get it blank! Do I have to make the manual forecast first?

Re: Ridge (Ridge Regression and Ridge Trace)

Posted: Wed May 18, 2011 10:28 am
by EViews Gareth
You could do it in EViews, or in Excel.

If you're getting blanks for the trace, you should probably provide the workfile so we can take a look.

Posted: Wed May 18, 2011 11:03 am
by stasibab
Housing.wf1 is the workfile I am using to get to know this regression methods.

In the ridge regression i put: dependant lrcons and independant: lrgdp lrprice
The baysean value set to 0.15

based on that i made the forecast set on the excel file below.