Pool Data and System Estimation

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 8:36 am

I have cross-sectional data and am running 100 OLS regressions using a system out of PROC> MAKE SYSTEM in my pool data object. Two questions:

QUESTION 1: I'm having a singular error due to one or two variables in a couple of different equations. This means that the entire system won't estimate. However, I'd like to be able to estimate the regressions by dropping whichever variables are causing the singular error. Any help?

QUESTION 2: I'd like to run a factor variable (categorical dummy) in my regressions (by cross section of course). Do you know how to run @expand in a system?

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

Re: Pool Data and System Estimation

Postby EViews Gareth » Mon Nov 17, 2008 9:08 am

First off, if the regressions are independent, I think you're probably better off running them individually (and, say, putting the results into a Spool if you want to collate them) than running them simultaneously in a system.

There is no easy way to identify which variables are causing your singularity.

From your system you could try clicking on Proc->Define System. The coefficient boxes there let you enter an @expand. However it may be that the rest of your specification cannot be easily entered using that dialog.

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 9:41 am

I would like to be able to run all these regressions at once, as to speed up this process. Based on the data, I can tell you the variables causing the singularity issue probably have the same number for each observation (perfectly collinear with the constant term). Any ideas?

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 9:44 am

Also, when I try to use @expand(period,@dropfirst) in the system, it says that "period is undefined" I've also tried @expand(period?,@dropfirst) which I think may be incorrect notation, but more precise logic.

Ultimately, I'd like to run at least 100 regressions quickly using cross-sectional data... so if there are any easier ways of doing this, I'd appreciate the help. I though about just writing a program, but I'm not too familiar with that. Each cross section is an alpha variable, so I could run one regression and just use an if statement to define which cross section to run the regression on, and work my way through the regressions 1 by 1.

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

Re: Pool Data and System Estimation

Postby EViews Gareth » Mon Nov 17, 2008 10:21 am

I would like to be able to run all these regressions at once, as to speed up this process. Based on the data, I can tell you the variables causing the singularity issue probably have the same number for each observation (perfectly collinear with the constant term). Any ideas?
The only solution is to remove the offending variable.

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

Re: Pool Data and System Estimation

Postby EViews Gareth » Mon Nov 17, 2008 10:26 am

Also, when I try to use @expand(period,@dropfirst) in the system, it says that "period is undefined" I've also tried @expand(period?,@dropfirst) which I think may be incorrect notation, but more precise logic.
What is PERIOD? The first thing you tried makes me believe it is a series in your workfile, in which case it should work.

Ultimately, I'd like to run at least 100 regressions quickly using cross-sectional data... so if there are any easier ways of doing this, I'd appreciate the help. I though about just writing a program, but I'm not too familiar with that. Each cross section is an alpha variable, so I could run one regression and just use an if statement to define which cross section to run the regression on, and work my way through the regressions 1 by 1.
If you have 100 cross-sections (not clear to me if that is the case or not) then you are probably better off working with Panels rather than Pools. Then you could write a very simple for loop in a program that would do the estimations for you. Something like:

Code: Select all

spool myspool equation e1 for !i=1 to 100 smpl if @crossid = !i e1.ls y c x1 x2 x3 myspool.append e1.stats next

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 12:08 pm

You're the man. Or woman? But either way, this is awesome.

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 12:25 pm

One more question. If I want to actually create regression objects for each of my cross sections... say, have them named e1, e2, e3, etc... how would I do that in my program?

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 12:29 pm

Nevermind... figured it out.

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 12:32 pm

spool myspool
for !i=1 to 59
equation e{!i}
smpl if @crossid = !i
e{!i}.ls ssu c price acv items promoacv promounits trend @expand(period,@dropfirst) easter
myspool.append e{!i}.stats
next

this is my equation right now. do you know if there's a way to say "if there's an error in my equation (maybe coming from singular errors or not enough observations, skip it and move on to the next regression..." also, is it possible to see all my coefficients somewhere so that I can export them all to excel?

cmgconsulting
Posts: 38
Joined: Mon Nov 17, 2008 8:25 am

Re: Pool Data and System Estimation

Postby cmgconsulting » Mon Nov 17, 2008 1:03 pm

Also, instead of having my equations named e1, e2, ... I have an alpha variable where each cross-section has a unique name. Is it possible to have the equation named whatever is in the first observation of each cross section for that particular variable? call that variable BPT.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests