Ridge (Ridge Regression and Ridge Trace)
Moderators: EViews Gareth, EViews Moderator, EViews Esther

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Ridge (Ridge Regression and Ridge Trace)
Try something greater than 1.
Follow us on Twitter @IHSEViews
Re: Ridge (Ridge Regression and Ridge Trace)
There are different methods of calculating an appropriate optimal lambda in the ridge regression (the original classical approach is by Hoerl and Kennard, 1970, but has been followed by other better approaches). However, in the addin I did not find any such code so it was assumed that the user would choose lambda in some other way (or calculate it manually).
I would like to apply Ridge regression, but then I need to add some lines where the optimal lambda is estimated, instead of just arbitrarily try different values of lambda. However, then it is necessary that I can access the Ridgeregression addin algorithm in the syntax (not by clicking the menus).
1. It is possible to call the Ridge regression addin by some syntax from the programming window?
2. Is it possible to access the original code inside the addin (e.g. how the ridge is estimated and how the standard errors are calculated etc). Then this addin could be redeveloped.
Thanks for your help!
/Kavorka
I would like to apply Ridge regression, but then I need to add some lines where the optimal lambda is estimated, instead of just arbitrarily try different values of lambda. However, then it is necessary that I can access the Ridgeregression addin algorithm in the syntax (not by clicking the menus).
1. It is possible to call the Ridge regression addin by some syntax from the programming window?
2. Is it possible to access the original code inside the addin (e.g. how the ridge is estimated and how the standard errors are calculated etc). Then this addin could be redeveloped.
Thanks for your help!
/Kavorka

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Ridge (Ridge Regression and Ridge Trace)
1. Yep  check the documentation for the addin (either by manually going to the addin folder, or by going to the Manage Addins menu and clicking on the Docs link for the addin).
2. Yep  just open up the corresponding addin files in your addin directory.
2. Yep  just open up the corresponding addin files in your addin directory.
Follow us on Twitter @IHSEViews
Re: Ridge (Ridge Regression and Ridge Trace)
The Ridge addin does not provide us with any standard errors (I know that it is sometimes questionable to see if something is statistically significantly different from zero when there is bias in the coefficients)
Is is possible to combine the Ridge addin with the addin EqBootstrap (bootstrap standard errors)?
Otherwise, do you have any other suggestions?
If I would use time series data I must use block bootstrap or maybe paired bootstrap which also helpes against heteroskedasticity. I know how EViews can conduct block bootstrap using @resample but is there a way to bootstrap a matrix with e.g. 3 'paired' variables? Are there any examples programs available somewhere?
Is is possible to combine the Ridge addin with the addin EqBootstrap (bootstrap standard errors)?
Otherwise, do you have any other suggestions?
If I would use time series data I must use block bootstrap or maybe paired bootstrap which also helpes against heteroskedasticity. I know how EViews can conduct block bootstrap using @resample but is there a way to bootstrap a matrix with e.g. 3 'paired' variables? Are there any examples programs available somewhere?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Ridge (Ridge Regression and Ridge Trace)
You would have to modify the original program to add standard errors. There is no @resample equivalent for matrices
Follow us on Twitter @IHSEViews
Re: Ridge (Ridge Regression and Ridge Trace)
If there is no @resample equivalent for matrices do you have any hints on how to bootstrap in pairs?
This pairs bootstrap apprach can be used for:
taking care of heteroskedasticity:
y1(t) = b0 + b1 * x1(t) + e1(t)
where I want to resample pairs of y(t) and x(t), e.g. y(9) together with x(9), y(11) together with x(11) etc.
or equivalently when we have a lagged model, we can adjust for time dependencies:
y2(t) = c0 + c1 * x2(t1) + e2(t)
where I want to resample pairs of y(t) and x(t1), e.g. y(6) together with x(5), y(32) together with x(31) etc.
This method is called the pairs (or pairwise) bootstrap because the dependent variable y and the independent variables X are always selected in pairs. Unlike the residual and wild bootstraps, the pairs bootstrap does not condition on X. Instead, each bootstrap sample has a diﬀerent X matrix. This method implicitly assumes that each observation is an independent random drawing from a multivariate distribution. It does not require that the error terms be homoskedastic, and it even works for dynamic models if we treat lagged dependent variables like any other element of X.
This pairs bootstrap apprach can be used for:
taking care of heteroskedasticity:
y1(t) = b0 + b1 * x1(t) + e1(t)
where I want to resample pairs of y(t) and x(t), e.g. y(9) together with x(9), y(11) together with x(11) etc.
or equivalently when we have a lagged model, we can adjust for time dependencies:
y2(t) = c0 + c1 * x2(t1) + e2(t)
where I want to resample pairs of y(t) and x(t1), e.g. y(6) together with x(5), y(32) together with x(31) etc.
This method is called the pairs (or pairwise) bootstrap because the dependent variable y and the independent variables X are always selected in pairs. Unlike the residual and wild bootstraps, the pairs bootstrap does not condition on X. Instead, each bootstrap sample has a diﬀerent X matrix. This method implicitly assumes that each observation is an independent random drawing from a multivariate distribution. It does not require that the error terms be homoskedastic, and it even works for dynamic models if we treat lagged dependent variables like any other element of X.

 Posts: 3
 Joined: Mon Jul 18, 2011 1:10 pm
Re: Ridge (Ridge Regression and Ridge Trace)
It would be excellent to get some standard errors for the ridge regression. Is it possible to get that? If the eviews staff do not have the time you could give some code or advice on how to create this. Standard errors based on block bootstrapping would work or maybe as suggested above standard errors based on paired bootstrapping.

 Posts: 3
 Joined: Mon Jul 18, 2011 1:10 pm
Re: Ridge (Ridge Regression and Ridge Trace)
EViews Gareth wrote:You would have to modify the original program to add standard errors. There is no @resample equivalent for matrices
Is there any @resample equivalent for 'groups', or any other way for pairwise resampling? It would be useful with SEs for ridge.
Another suggestion, it would be useful with a compiler for matrix language in EViews. Translating the command, or something like this (X'X+L*I)1 X'y
to
@inverse( (@transpose(X)*X) + (lambda*@identity({noindepvars})) ) * (@transpose(X)*y)
not exactly the same but you get what I mean.

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

 Posts: 3
 Joined: Mon Jul 18, 2011 1:10 pm
Re: Ridge (Ridge Regression and Ridge Trace)
Is it the UNCENTERED variance inflation factor (VIF) that is presented for the ridgereg addin?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Ridge (Ridge Regression and Ridge Trace)
hi,
can i ask can this be used in evoews 7 or how can i do ridge in 7?
theres no documentation. apology.
can i ask can this be used in evoews 7 or how can i do ridge in 7?
theres no documentation. apology.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Ridge (Ridge Regression and Ridge Trace)
You need EViews 7.1 or later.
Follow us on Twitter @IHSEViews
Re: Ridge (Ridge Regression and Ridge Trace)
Dear,
could you please advice how to apply ridge regression using pooled data (fixed effect) , it keeps give me (undefined dependant )!!!!
thanks in advance
could you please advice how to apply ridge regression using pooled data (fixed effect) , it keeps give me (undefined dependant )!!!!
thanks in advance

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11836
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Ridge (Ridge Regression and Ridge Trace)
The addin doesn't support pooled data.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 2 guests