Hello everyone,
i have a problem implementating the hausman test for an unbalanced panel dataset in STATA.
i have panel data of 50 countrys over 20 years. Now i want to do the hausman test to devide whether fixed-efects or random efects better fits my data.
When i do the hausman test by:
xtreg y x1 x2 x3 , fe
estimates store fe
xtregy x1 x2 x3, re
estimates store re
hausman fe re
first i get the error:
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5); be sure this is what you expect, or there may be problems computing the test. Examine the output of yourestimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
and then :
(V_b-V_B is not positive definite)
After reading about this problem in the forum i tried using the hausman fe re, sigmamore approach.
But now i get the same error
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5); be sure this is what you expect, or there may be problems computing the test. Examine the output of yourestimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
Are my results of the hausman test still valid after getting just the first error message, but not the second?
and generally, can i use hausman test if i have an unbalanced panel?
Thank you very much,
kind regards Sophia
i have a problem implementating the hausman test for an unbalanced panel dataset in STATA.
i have panel data of 50 countrys over 20 years. Now i want to do the hausman test to devide whether fixed-efects or random efects better fits my data.
When i do the hausman test by:
xtreg y x1 x2 x3 , fe
estimates store fe
xtregy x1 x2 x3, re
estimates store re
hausman fe re
first i get the error:
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5); be sure this is what you expect, or there may be problems computing the test. Examine the output of yourestimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
and then :
(V_b-V_B is not positive definite)
After reading about this problem in the forum i tried using the hausman fe re, sigmamore approach.
But now i get the same error
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5); be sure this is what you expect, or there may be problems computing the test. Examine the output of yourestimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
Are my results of the hausman test still valid after getting just the first error message, but not the second?
and generally, can i use hausman test if i have an unbalanced panel?
Thank you very much,
kind regards Sophia
Comment