Dear all,
As I've been running a couple of panel regressions, a problem often stated on statalist occurred, the Hausman test mentioned
as well as
. Similar quotes came up at the analysis of control variables only. As suggested in previous threads I've tried to solve the issue using both sigmamore, sigmaless and changing the Total assets and GDP variables into different scales (thousands, millions, billions). However, none of the (combinations of) solutions solved my problem. Implementing xtoverid did give probable results, however I'm not sure if I'm always allowed to use this instead of the Hausman test. Am I right in this assumption? Does anyone have a suggestion how to handle my problem?
I used the following code in a do-file to conduct the full analysis at once, perhaps there is a mistake there?:
Thank you very much in advance!
As I've been running a couple of panel regressions, a problem often stated on statalist occurred, the Hausman test mentioned
the rank of the differenced variance matrix (6) does not equal the number of coefficients being tested (7);
be sure this is what you expect, or there may be problems computing the test. Examine the output of your
estimators for anything unexpected and possibly consider scaling your variables so that the coefficients
are on a similar scale.
be sure this is what you expect, or there may be problems computing the test. Examine the output of your
estimators for anything unexpected and possibly consider scaling your variables so that the coefficients
are on a similar scale.
(V_b-V_B is not positive definite)
I used the following code in a do-file to conduct the full analysis at once, perhaps there is a mistake there?:
Code:
global id Bank1 global t Date1 global ylist Expenses global xlist_contr Tot_assets_CS2 GDP_FRED2 Rep_senate_dummy Rep_house_dummy Rep_president_dummy global xlist Tot_assets_CS GDP_FRED Rep_senate_dummy Rep_house_dummy Rep_president_dummy ROE_FR Tot_riskbased_capt_ratio_BR describe $id $t $ylist $xlist summarize $id $t $ylist $xlist outreg2 using x.doc, replace sum(log) * Test multicollinearity - control variables quietly reg $ylist $xlist_contr estat vif * Test multicollinearity quietly reg $ylist $xlist estat vif * Set data as panel data sort $id $t xtset $id $t xtdescribe xtsum $id $t $ylist $xlist * Pooled OLS estimator reg $ylist $xlist outreg2 using myreg.doc, replace ctitle(OLS) * Population-averaged estimator xtreg $ylist $xlist, pa * Between estimator xtreg $ylist $xlist, be * Fixed effects or within estimator - control variables xtreg $ylist $xlist_contr, fe outreg2 using myreg.doc, append ctitle(Fixed Effects control variables) addtext(Bank FE, YES) * Test for heteroskedasticity xttest3 * Test for autocorrelation xtserial $ylist $xlist_contr * Fixed effects or within estimator xtreg $ylist $xlist, fe outreg2 using myreg.doc, append ctitle(Fixed Effects) addtext(Bank FE, YES) * Test for heteroskedasticity xttest3 * Test for autocorrelation xtserial $ylist $xlist * First-differences estimator reg D.($ylist $xlist), noconstant * Random effects estimator - control variables xtreg $ylist $xlist_contr, re theta outreg2 using myreg.doc, append ctitle(Random Effects control variables) * Random effects estimator xtreg $ylist $xlist, re theta outreg2 using myreg.doc, append ctitle(Random Effects) * Hausman test for fixed versus random effects model - control variables quietly xtreg $ylist $xlist_contr, fe estimates store fixed quietly xtreg $ylist $xlist_contr, re estimates store random hausman fixed random * Sargan-Hansen test for fixed versus random effects model - control variables quietly xtreg $ylist $xlist_contr, re xtoverid * Hausman test for fixed versus random effects model quietly xtreg $ylist $xlist, fe estimates store fixed quietly xtreg $ylist $xlist, re estimates store random hausman fixed random * Sargan-Hansen test for fixed versus random effects model quietly xtreg $ylist $xlist, re xtoverid * Breusch-Pagan LM test for random effects versus OLS quietly xtreg $ylist $xlist, re xttest0 * Recovering individual-specific effects quietly xtreg $ylist $xlist, fe predict alphafehat, u sum alphafehat estat vce