combine fixed effect and random effect in panel data

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

combine fixed effect and random effect in panel data

Postby maxchen » Thu Dec 11, 2014 6:27 am

Let the stability of a basket ball play be modeled by random effect, and I like to treat the ability of the player as fixed effect (using dummy variables in estimation).

However, in EViews 8.1, there seems some problems

Code: Select all

%ex8 = "\Example Files\EV8 Manual Data\"
%ch40 = "Chapter 40 - Working with Panel Data"
%wf = @evpath + %ex8 +%ch40 +"\grunfeld_baltagi_panel.wf1"
wfopen %wf
rename c01 K

'Near singular matrix, the following 3 eqs
'equation eq10.ls(CX=R) I  @expand(fn)  F K
'equation eq11.ls(CX=R,RANCALC=WH) I  @expand(fn)  F K
'equation eq12.ls(CX=R,RANCALC=WK) I  @expand(fn)  F K

'work for RANCALC={ WH WK}
'equation eq20.ls(CX=R) I  c @expand(fn,@droplast)  F K      '# of cross < # of coef
equation eq21.ls(CX=R,RANCALC=WH) I  c @expand(fn,@droplast)  F K   'QUE by POLS
equation eq22.ls(CX=R,RANCALC=WK) I  c @expand(fn,@droplast)  F K   'QUE by LSDV


In this short codes
1 eq10, eq11 and eq12 all lead to "Near singular matrix" error, why?
2 eq21 and eq22 works, why not "Near singular matrix" like eq11 and eq12?
3 Eq20 does not work, for the QUE is estimated by Between estimator, where the number of observation (cross section member) is less than the number of coefficients. We know that eq22 uses LSDV for QUE, why not "Near singular matrix" in the LSDV step?

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: combine fixed effect and random effect in panel data

Postby maxchen » Thu Dec 11, 2014 6:43 am

besides, the Hausman test says

" Cross-section test variance is invalid. Hausman statistic set to zero."


Code: Select all

freeze(tbh21) eq21.ranhaus
freeze(tbh22) eq22.ranhaus

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

Re: combine fixed effect and random effect in panel data

Postby EViews Glenn » Thu Dec 11, 2014 6:12 pm

This is really posted in the wrong place but I'll take a crack at answering.

The issue is that for various reasons (many related for producing out-of-sample forecasts), EViews estimates models where the effects are specified as deviations from an overall mean. Thus, we always add a "C" to the set of variables in the model when you estimate with fixed and random effects and do various manipulations to get the dummy variables and random effects estimates to be expressed in those terms.

The first set of models therefore get the singularity since you are in estimating the coefficients of a model that includes the variables C and @expand(FN) which are perfectly correlated.

From best of my recollection, the second set of models does not have the same issue since for purposes of computing the residuals to feed into the QUE we don't really care about perfect correlation. Thus, while the LSDV coefficients aren't identified, the orthogonal projection is well defined.

The zero Hausman test statistic is because the covariance matrix of the test is not positive-definite. This is a common result for the Hausman test as the difference estimator is not guaranteed to produce a positive definite estimate.

ZIZIZI
Posts: 1
Joined: Mon Jul 06, 2015 1:56 pm

Re: combine fixed effect and random effect in panel data

Postby ZIZIZI » Mon Jul 06, 2015 2:04 pm

hello, im gonna ask another question about invalid hausman test. if we stuck :roll: on that situation when prob 1.0000 but eviews said "Cross-section test variance is invalid. Hausman statistic set to zero". what result its mean? Random effect or Fixed effect?
thank you.... :D

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

Re: combine fixed effect and random effect in panel data

Postby EViews Glenn » Wed Jul 08, 2015 8:05 am

It means that the test cannot distinguish between the two. The reason for this is usually that you don't have enough observations for the required asymptotics to kick in.


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 66 guests