Makesystem - NAs in variables

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

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Makesystem - NAs in variables

Postby tvonbrasch » Mon Mar 31, 2014 6:09 am

Hi,

i have estimated a fixed effects model using the pool object. Some of the variables are nas only, but this is not a problem when using the pool object for estimation. I want to place restrictions on some of the coefficients in the system. however, when i use the command

atest.makesystem(name=aa, cx=f) tfpr_nor_? cprd_nor_? at_nor_?

i get the message:
No valid obervations in "Do_atest.makesystem(name=aa, cx=f) tfpr_nor_ cprd_nor_? at_nor_?

if one of the variables only has NAs. If I have a pool object, and i want to make a system, how do i proceed if some of the variables in some of the cross sections only have NAs?
Sincerely
Thomas von Brasch

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

Re: Makesystem - NAs in variables

Postby EViews Gareth » Mon Mar 31, 2014 8:56 am

Could you provide the workfile?

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: Makesystem - NAs in variables

Postby tvonbrasch » Mon Mar 31, 2014 10:01 pm

Sure,

if you use the commands

pool atest d10t33 d45t47
genr at_nor_d45t47=na
atest.makesystem(name=aa, cx=f) tfpr_nor_? cprd_nor_? at_nor_?


it will not work, but if you skip the second command and write
pool atest d10t33 d45t47
atest.makesystem(name=aa, cx=f) tfpr_nor_? cprd_nor_? at_nor_?


the system is created.

thanks for looking at this
Thomas
Attachments
makesystem.wf1
(414.43 KiB) Downloaded 235 times

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

Re: Makesystem - NAs in variables

Postby EViews Glenn » Tue Apr 01, 2014 10:31 am

Pool objects serve dual purposes: as an estimation object, and as a method of processing using pool identifiers.

In the special case where you estimate a pool specification, EViews automatically drops cross-sections after performing listwise exclusion of missing variables. This is why you don't see any problems when you estimate with missings. You'll simply get a message in the output indicating that this operation has been performed.

Making a system object from a pool is an example of the second purpose of a pool. Indeed, in your example, no estimation was performed and no dropping of cross-sections occurs. In this case, there is no adjustment of the pool identifiers for complete missings. Unfortunately, the structure of the pool object requires that we do sample processing prior to creating the system, and in your case, this is generating an error due to the NAs.

Let me see if I can come up with a solution that will work for you. I have a couple of ideas. Obviously, for now, you can create a pool with the identifiers that are used when you perform your estimates.

[edit] I've checked in changes that will use the dropped cross-section list from a pool that has been estimated. I think this really should be the default behavior. It will appear in the next patch. When it does, you can estimate your pool and these makesystem on the estimated pool and you won't experience the sample error message (though you'll have some equations dropped from the system).

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: Makesystem - NAs in variables

Postby tvonbrasch » Tue Apr 01, 2014 10:36 pm

Perfect, thank you!
Thomas


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests