Panel Data - Fixed Effects

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

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

Re: Panel Data - Fixed Effects

Postby EViews Glenn » Mon Aug 18, 2014 7:55 am

Not so simple to modify Gareth's program. There is, however, a Wooldridge test for serial correlation that is straightforward to perform. I believe we have an example in our manual.

Muhammad_Sabir
Posts: 3
Joined: Tue Apr 28, 2015 4:52 am

Re: Panel Data - Fixed Effects

Postby Muhammad_Sabir » Tue Apr 28, 2015 5:01 am

Dear Glen How can I reproduce eviews results of both fixed effects of period and cross section through dummy variables

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

Re: Panel Data - Fixed Effects

Postby EViews Glenn » Tue Apr 28, 2015 11:06 am

In an annual workfile, something like

Code: Select all

equation eq0.ls(cx=f, per=f) i c f equation eq1.ls i c f @expand(@crossid, @dropfirst) @expand(@year, @dropfirst)
will match the results for the regressors. You'll have to do additional work to get the dummies to match since we estimate a different normalization of the constants.

Muhammad_Sabir
Posts: 3
Joined: Tue Apr 28, 2015 4:52 am

Re: Panel Data - Fixed Effects

Postby Muhammad_Sabir » Sat May 02, 2015 4:24 am

In an annual workfile, something like

Code: Select all

equation eq0.ls(cx=f, per=f) i c f equation eq1.ls i c f @expand(@crossid, @dropfirst) @expand(@year, @dropfirst)
will match the results for the regressors. You'll have to do additional work to get the dummies to match since we estimate a different normalization of the constants.
Thanks Glenn for your reply. However, I did not fully grasp your answer. Basically I am teaching a course and give an exercise to replicate fixed effect model results by using eviews panel options and dummy variables. They did for cross section and period separately. However, they and as well as I did not able to match results if using both cross-section and period fixed effects. Since, I am using n-1 cross section dummies and k-1 period dummies then constant have impact of a period and cross section. And I don't know how to separate these effect. I need your help in this regard and will highly appreciate.

Muhammad_Sabir
Posts: 3
Joined: Tue Apr 28, 2015 4:52 am

Re: Panel Data - Fixed Effects

Postby Muhammad_Sabir » Tue May 05, 2015 3:10 am

Thanks Glenn for your reply. However, I did not fully grasp your answer. Basically I am teaching a course and give an exercise to replicate fixed effect model results by using eviews panel options and dummy variables. They did for cross section and period separately. However, they and as well as I did not able to match results if using both cross-section and period fixed effects. Since, I am using n-1 cross section dummies and k-1 period dummies then constant have impact of a period and cross section. And I don't know how to separate these effect. I need your help in this regard and will highly appreciate.

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

Re: Panel Data - Fixed Effects

Postby EViews Glenn » Wed May 06, 2015 10:31 am

The following shows one method for normalizing direct dummy variables estimates to match the EViews two-way effects normalization. To perform the computations, you should open the "grunfeld_baltagi_panel.wf1" workfile provided with your copy of EViews. Note that the validity of the computations below assume that there is a balanced panel.

Code: Select all

' The following shows one method for normalizing direct dummy variables estimates to match the EViews two-way effects normalization ' to perform the computations, you should open the grunfeld_baltagi_panel.wf1 workfile provided with your copy of EViews. Note that the validity ' of the computations below assume that there is a balanced panel. ' estimate with dummy variables leaving out one year category equation eqdirect.ls f i @expand(fn) @expand(yr, @dropfirst) ' estimate with built-in fixed effects equation eqeviews.ls(cx=f,per=f) f i ' extract the full set of coefficients from the dummy variables regression vector directcoefs = eqdirect.@coefs ' extract just the fixed effects estimates from the dummies vector directcx = @subextract(directcoefs,2,1,11,1) ' cross-section effects vector directper = @subextract(directcoefs,12,1,eqdirect.@ncoefs,1) ' period effects ' compute the mean of the cross-section effects and center those effects scalar overall_mean = @mean(directcx) vector cxeff = directcx - overall_mean ' center the effects ' compute the mean of the period effects scalar per_mean = @sum(eq1yr)/20 ' create full vector of period effects putting a zero for the omitted category then center the effects vector(20) pereff pereff(1) = 0 matplace(pereff, directper, 2,1) pereff = pereff - per_mean ' center the effects ' compute overall constant from the centering means scalar adjusted_mean = overall_mean + per_mean ' grab the intercept and the beta vector(2) coefs coefs(1) = adjusted_mean coefs(2) = directcoefs(1) ' you may compare with the results from the equation object EQEVIEWS

Gude
Posts: 19
Joined: Thu Dec 03, 2015 3:20 am

Re: Panel Data - Fixed Effects

Postby Gude » Sat May 28, 2016 7:19 am

This was very helpful! Is there also a similar guidance when we deal with unbalanced panels? Or maybe a literature hint?

johnviter
Posts: 1
Joined: Sun May 22, 2016 2:31 pm

Re: Panel Data - Fixed Effects

Postby johnviter » Wed Jun 15, 2016 6:01 am

Hello,

If i use a fixed effect on the period, whether the results can be used to estimate the influence of the independent variable on the dependent in each period? How i can interpret that the chow test results in cross section (fixed effect) and period (fixed effect) it is better to use? Am I legally use a fixed effect in the period?

Thank You,



John Viter Pakpahan


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest