Page 1 of 1

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

Posted: Wed May 16, 2018 5:45 am
by mamo
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

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

Posted: Wed May 16, 2018 5:57 am
by EViews Gareth
Make residuals then set the sample to if resid<>na

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

Posted: Thu May 17, 2018 1:30 am
by mamo
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

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

Posted: Thu May 17, 2018 6:43 am
by EViews Gareth
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.