Ridge (Ridge Regression and Ridge Trace)

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Fri Jul 30, 2010 2:00 pm

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.
Follow us on Twitter @IHSEViews

subbuteo1
Posts: 3
Joined: Wed Mar 02, 2011 6:44 am

Re: Ridge (Ridge Regression and Ridge Trace)

Postby subbuteo1 » Tue Mar 08, 2011 10:56 am

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)

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Glenn » Tue Mar 08, 2011 10:59 am

What is " *variable " supposed to represent?

subbuteo1
Posts: 3
Joined: Wed Mar 02, 2011 6:44 am

Re: Ridge (Ridge Regression and Ridge Trace)

Postby subbuteo1 » Tue Mar 08, 2011 11:15 am

sorry, its just one of my regressors.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Tue Mar 08, 2011 12:09 pm

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).
Follow us on Twitter @IHSEViews

subbuteo1
Posts: 3
Joined: Wed Mar 02, 2011 6:44 am

Re: Ridge (Ridge Regression and Ridge Trace)

Postby subbuteo1 » Wed Mar 09, 2011 11:22 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Wed Mar 09, 2011 11:53 am

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.
Follow us on Twitter @IHSEViews

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Fri Mar 11, 2011 11:56 am

A new version that should fix that has been uploaded.
Follow us on Twitter @IHSEViews

stasibab
Posts: 55
Joined: Sun May 08, 2011 2:20 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby stasibab » Tue May 17, 2011 5:45 pm

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!
Attachments
housing.wf1
(10.86 KiB) Downloaded 1324 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Tue May 17, 2011 6:57 pm

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.
Follow us on Twitter @IHSEViews

stasibab
Posts: 55
Joined: Sun May 08, 2011 2:20 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby stasibab » Wed May 18, 2011 3:52 am

Where can I find this documentation?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Wed May 18, 2011 7:53 am

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.
Follow us on Twitter @IHSEViews

stasibab
Posts: 55
Joined: Sun May 08, 2011 2:20 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby stasibab » Wed May 18, 2011 10:23 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Ridge (Ridge Regression and Ridge Trace)

Postby EViews Gareth » Wed May 18, 2011 10:28 am

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.
Follow us on Twitter @IHSEViews

stasibab
Posts: 55
Joined: Sun May 08, 2011 2:20 pm

Postby stasibab » Wed May 18, 2011 11:03 am

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.
Attachments
housing excel.xlsx
(18.7 KiB) Downloaded 1252 times
housing.wf1
(10.86 KiB) Downloaded 1304 times


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 18 guests