Measuring between effects for panels

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

ralf
Posts: 10
Joined: Mon Jun 21, 2010 8:15 am

Measuring between effects for panels

Postby ralf » Tue Aug 17, 2010 7:54 am

Hi, is there a way to measure "between effects" in unbalanced panels using EViews 7?

Background: Fixed-effects models allow the analysis of "within effects", random-effects and pooled-OLS regressions measure both within and between effects.

Is there any add-in or any other simple way to isolate between effects (in unbalanced panels!)?

Thanks in advance for any suggestions,

Ralf

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Measuring between effects for panels

Postby EViews Glenn » Tue Aug 17, 2010 10:59 am

I really should make this a FAQ on this one when I get a chance...

The between regression simply regresses means by cross-section of the dependent variable on means by cross-section of the independent variables. There are a number of relatively easy ways of doing this. I'll discuss two:

1. Using a new Workfile Page (harder)

The most sophisticated way to do this is to create a new workfile page containing only the cross-section identifiers, then to link over your data using means to contract the data. Suppose you have a panel with cross-section ID variable FN, then you should first enter the command

Code: Select all

pagecreate(byid, page=means) fn
to create a new page containing only the identifier values. You can perform the same operation by clicking on the New Page tab on the bottom of your workfile, selecting Specify by Identifier Series... and entering "FN" under Cross ID series (and clearing out the Date ID series edit field).

Next, copy all of your independent and dependent variables from the original page into the new page. The easiest way to do this is to select all of the series, right-click and choose Copy, then go to the new page and right-click and select Paste Special. The default settings for the paste should be to match merge using the IDs and to use means to perform the contraction. You could also do this last step with the copy command.

Then just run the regression of interest in the new page.

While a bit of work to set up, this approach has the advantage of then allowing you do whatever kinds of analysis you want with the means data.


2. Using the existing Workfile Page

We will use the @meansby(VAR, @crossid) to compute the means of the data by cross-section. Suppose you have the series Y and you wish to regression on X1 and X2. Then you should create variables containing the cross-section means (I'm assuming here that the sample is set the entire sample -- the code below can be modified accordingly):

Code: Select all

smpl @all series ym = @meansby(y, @crossid) series x1m = @meansby(x1, @crossid) series x2m = @meansby(x2, @crossid)
and then run the regression

Code: Select all

smpl if @cellid=@minsby(@cellid, @crossid) equation eqbtw.ls ym c x1m x2m
to get the between regression. Note that we use the @cellid condition to ensure that we get only one observation per cross-section.

On a parenthetic note. The reason that we don't offer the between regression as a built-in EViews feature is that it doesn't work like our other equation objects in the sense that uses a sample and data that don't match the data or sample found in the workfile. So working with an equation object estimated in this way is difficult.

One other note: I'm not doing any adjustments in the equations for the unequal number of observations in an unbalanced panel. It should be straightforward to do adjustments depending on how you want to handle that...

That said, this is a good candidate for an add-in and I'll look into this in the near future.

ralf
Posts: 10
Joined: Mon Jun 21, 2010 8:15 am

Re: Measuring between effects for panels

Postby ralf » Tue Aug 17, 2010 11:56 am

Thanks Glenn!

ralf
Posts: 10
Joined: Mon Jun 21, 2010 8:15 am

Re: Measuring between effects for panels

Postby ralf » Tue Sep 07, 2010 11:51 am

Hi Glenn,

now I'm working with an unbalanced panel and I would like to perform a cross-sectional regression again. I calculated the means in the existing workfile page and tried to run the regression with averages from all cross-sections. Each average should only be included only once, unfortunately I don't have any year with data for all cross-sections. Can I run a regression with averages for my cross-sections only?

Thanks,

Ralf


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests