Page 1 of 1

Extracting sample and observations from equation

Posted: Tue Jul 19, 2016 8:21 am
by glockner
Hello, I'd like to extract the sample length and number of observations from a series of equations to put into an Eviews table when running a loop through multiple equations. I've discovered that the command "[equation].@smpl" does not reference the actual sample used in estimating the equation, but the sample I set initially in the program (for example "smpl 1990m1 @last). Is there another command that returns the sample used in the regression equation? Thanks.

Re: Extracting sample and observations from equation

Posted: Tue Jul 19, 2016 8:24 am
by EViews Gareth
Since the observations used are often very difficult to define by a sample, you cannot retrieve them in sample form.

The easiest way to do it is to generate the residual series from the equation then set a sample of if resid01<>NA (since the residual series will only have values for observations used for estimation).

Re: Extracting sample and observations from equation

Posted: Tue Jul 19, 2016 10:40 am
by glockner
Thanks. This helps.