Extracting sample and observations from equation

For questions regarding programming in the EViews programming language.

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

glockner
Posts: 8
Joined: Wed Jun 22, 2016 11:21 am

Extracting sample and observations from equation

Postby glockner » Tue Jul 19, 2016 8:21 am

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.

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

Re: Extracting sample and observations from equation

Postby EViews Gareth » Tue Jul 19, 2016 8:24 am

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).

glockner
Posts: 8
Joined: Wed Jun 22, 2016 11:21 am

Re: Extracting sample and observations from equation

Postby glockner » Tue Jul 19, 2016 10:40 am

Thanks. This helps.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest