As I have already stated in another post, I am working on my thesis about the Environmental Kuznets Curve for Latin America and Southeast Asia, with a pannel data with fixed and random effects. I am using logarithmics and robust standard errors. I would like to assess the difference in the effects between the two regions. Particularly, now I want to compare in my Case Study the EKC for Malaysia and Mexico.
However, if I include the cubic term (ln(gdppc)^3) in the model with random effects, and using the "robust" command, I get this error Warning: variance matrix is nonsymmetric or highly singular. But if I remove "robust", everything seems normal. I have no issues with fixed effects either. I am aware of collinearity issues, but of course ln(gdppc)^3, ln(gdppc)^2 and ln(gdppc) are correlated.
What is the reason for this? The fact that I only have two countries now in my panel data? Should I just drop the cubic term?
However, if I include the cubic term (ln(gdppc)^3) in the model with random effects, and using the "robust" command, I get this error Warning: variance matrix is nonsymmetric or highly singular. But if I remove "robust", everything seems normal. I have no issues with fixed effects either. I am aware of collinearity issues, but of course ln(gdppc)^3, ln(gdppc)^2 and ln(gdppc) are correlated.
What is the reason for this? The fact that I only have two countries now in my panel data? Should I just drop the cubic term?
Code:
. eststo: xtreg ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3, fe robust Fixed-effects (within) regression Number of obs = 118 Group variable: country Number of groups = 2 R-sq: Obs per group: within = 0.2693 min = 59 between = 1.0000 avg = 59.0 overall = 0.0014 max = 59 F(1,1) = . corr(u_i, Xb) = -0.3598 Prob > F = . (Std. Err. adjusted for 2 clusters in country) ------------------------------------------------------------------------------ | Robust ln_co2pc | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- ln_gdppc | 56.23241 127.2374 0.44 0.735 -1560.472 1672.937 ln_gdppc2 | -5.997683 14.16097 -0.42 0.745 -185.9298 173.9345 ln_gdppc3 | .2130129 .5230721 0.41 0.754 -6.433248 6.859274 _cons | -166.5973 379.3559 -0.44 0.737 -4986.771 4653.576 -------------+---------------------------------------------------------------- sigma_u | .74302637 sigma_e | .2639118 rho | .88797616 (fraction of variance due to u_i) ------------------------------------------------------------------------------ (est5 stored) . est store fe_model2 . eststo: xtreg ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3, re robust Warning: variance matrix is nonsymmetric or highly singular Random-effects GLS regression Number of obs = 118 Group variable: country Number of groups = 2 R-sq: Obs per group: within = 0.0008 min = 59 between = 1.0000 avg = 59.0 overall = 0.1316 max = 59 Wald chi2(0) = . corr(u_i, X) = 0 (assumed) Prob > chi2 = . (Std. Err. adjusted for 2 clusters in country) ------------------------------------------------------------------------------ | Robust ln_co2pc | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ln_gdppc | 147.2208 . . . . . ln_gdppc2 | -16.86284 . . . . . ln_gdppc3 | .641623 . . . . . _cons | -418.0718 . . . . . -------------+---------------------------------------------------------------- sigma_u | 0 sigma_e | .2639118 rho | 0 (fraction of variance due to u_i) ------------------------------------------------------------------------------ (est6 stored) eststo: xtreg ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3, re Random-effects GLS regression Number of obs = 118 Group variable: country Number of groups = 2 R-sq: Obs per group: within = 0.0008 min = 59 between = 1.0000 avg = 59.0 overall = 0.1316 max = 59 Wald chi2(3) = 17.27 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0006 ------------------------------------------------------------------------------ ln_co2pc | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ln_gdppc | 147.2208 52.58949 2.80 0.005 44.14731 250.2943 ln_gdppc2 | -16.86284 5.884774 -2.87 0.004 -28.39678 -5.328892 ln_gdppc3 | .641623 .2189241 2.93 0.003 .2125396 1.070706 _cons | -418.0718 156.2279 -2.68 0.007 -724.2728 -111.8708 -------------+---------------------------------------------------------------- sigma_u | 0 sigma_e | .2639118 rho | 0 (fraction of variance due to u_i) ------------------------------------------------------------------------------ (est8 stored)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int year str18 countryname float(ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3) 1961 "Malaysia" 8.520259 7.839132 61.45198 481.7302 1965 "Malaysia" 8.865287 7.964156 63.42778 505.1487 1973 "Malaysia" 9.31995 8.314097 69.124214 574.70544 2001 "Malaysia" 9.198155 9.496061 90.17519 856.3091 1962 "Mexico" 8.251151 8.493105 72.13284 612.6318 1969 "Mexico" 7.768713 8.79921 77.42609 681.2883 1990 "Mexico" 8.872553 9.179778 84.26833 773.5645 1993 "Mexico" 8.566209 9.245498 85.47923 790.2981 2011 "Mexico" 8.312154 9.629708 92.73129 892.9752 2014 "Mexico" 8.595571 9.671303 93.5341 904.5967 end
Comment