How can I align samples from two equations?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

sarah_ec
Posts: 7
Joined: Mon Aug 24, 2015 4:25 am

How can I align samples from two equations?

Postby sarah_ec » Mon Aug 24, 2015 4:58 am

Hi all!

I want to compare two ols-equations and I am using different variables, however both have the same dated and id-series.

However, not all the explanatory variables are available for all id-series, which means that the number of observations differs within the two equations. So basically eviews creates two different samples, each time using only the observations for which the data is available that is used in the specific equation. To be able to compare both equations, I need to have exactly the same sample. Is it possible to tell eviews that it should only use data for which there values in both equations, without actually using all the variables in each (so that the output table shows the same number of cross-sections and observations)?

Hope my text desribes the problem in an understandable way.

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

Re: How can I align samples from two equations?

Postby EViews Gareth » Mon Aug 24, 2015 7:20 am

Use Proc->Make Resid from each equation. That will give you two residual series. Then in your third equation use a sample of "if resid01<>NA and resid02<>na".

sarah_ec
Posts: 7
Joined: Mon Aug 24, 2015 4:25 am

Re: How can I align samples from two equations?

Postby sarah_ec » Mon Aug 24, 2015 7:25 am

Perfect, Thank you so much!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests