My apologies if this topic has been covered before, but I cannot seem to find it anywhere on or off the forum. I am running EViews 8, but have also tried this on EViews 7.
In various contexts I want to estimate many equations and their lags, so for example I want to try the same equation with one lag, two lags, etc using basic least squares. For example:
eq.ls gdp gdp(-1) oilp(-1)
and
eq.ls gdp gdp(-1) gdp(-2) oilp(-1) oilp(-2)
what I am finding is that the specification with two lags above runs much faster than the following (which I am currently using in various loops):
eq.ls gdp gdp(-1 to -2) oilp(-1 to -2)
I can post my code if you like, but was hoping there was a previous thread I have not seen that addresses this issue. Any other help on why the final specification might be so slow would be appreciated. Thanks.
Slow Least Squares Estimation Due to Lags
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Slow Least Squares Estimation Due to Lags
It seems unlikely there would be any difference. Are you sure?
Re: Slow Least Squares Estimation Due to Lags
That is what I thought. I've attached the program, I've tried it on two different machines and it is very slow in both cases. About halfway down you'll see some loops where I estimate several equations with the lags changing dynamically. When I type in the lags manually (for up to 6 lags) all of the loops take less than a couple of minutes. When I run the program as attached it takes at least 90 minutes.
I've also run completely different programs with a similar looping structure to go over multiple lags and I have the same problem.
Thanks for your help with this.
I've also run completely different programs with a similar looping structure to go over multiple lags and I have the same problem.
Thanks for your help with this.
- Attachments
-
- dfm_pca.prg
- (8.27 KiB) Downloaded 375 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Slow Least Squares Estimation Due to Lags
Could we have the workfile too?
Re: Slow Least Squares Estimation Due to Lags
Sorry, it is attached.
- Attachments
-
- ngpd_pca2.wf1
- (48.51 KiB) Downloaded 306 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Slow Least Squares Estimation Due to Lags
How do I replicate what you're seeing?
I just ran the program on the workfile. It took 4.268 seconds to run.
I just ran the program on the workfile. It took 4.268 seconds to run.
Re: Slow Least Squares Estimation Due to Lags
I'm not sure, but I think I figured out the problem. After your message I stopped allowing the program to automatically search databases (Options: DB registry), and now it works very quickly. Thanks for looking into this so quickly.
Who is online
Users browsing this forum: No registered users and 1 guest
