How to extract the sample actually used for estimation in equations?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

mamo
Posts: 189
Joined: Wed Nov 07, 2012 9:11 am

How to extract the sample actually used for estimation in equations?

Postby mamo » Wed May 16, 2018 5:45 am

Dear Eviews team,

I am using Eviews 9 December 2016 built.

Is there an easy way to extract the sample actually used for estimation (i.e., after adjustments of missing values) in an equation object in a program?

The string provided by "equation.@smpl" would not do since it provides the sample which was in place when the estimation was called for; it does not account for the sample actually used after adjustment for missing values.

Best, mamo

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

Re: How to extract the sample actually used for estimation in equations?

Postby EViews Gareth » Wed May 16, 2018 5:57 am

Make residuals then set the sample to if resid<>na
Follow us on Twitter @IHSEViews

mamo
Posts: 189
Joined: Wed Nov 07, 2012 9:11 am

Re: How to extract the sample actually used for estimation in equations?

Postby mamo » Thu May 17, 2018 1:30 am

Many thanks,

this works if you just want to set the sample accordingly, but it is not quite the solution if you are after getting the exact definition of the adjusted sample for further processing and usage in a program. (Note that calling @pagesmpl after "sample if resid<>na" would not provide the wanted result.)

One approach would be freezing and subsequently parsing the equation results view, but this is cumbersome (and prone to errors).

I'd therefore suggest that the Eviews teams adds a string like "equation.@smpladj" to the equation object in future updates of Eviews

Best

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

Re: How to extract the sample actually used for estimation in equations?

Postby EViews Gareth » Thu May 17, 2018 6:43 am

It isn’t quite that simple though. What if the equation estimates on data where every other observation is NA? There is no way to represent the actual sample.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 14 guests