Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Warning: variance matrix is nonsymmetric or highly singular" for robust random effects model

    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?

    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

  • #2
    Guest:
    two panels only makes -cluster-robust- standard errors much more unreliable than their default counterparts.
    Therefore, if you really have two panels, stick with default standard errors.
    Last edited by sladmin; 02 Mar 2024, 08:15. Reason: anonymize original poster
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Guest:
      two panels only makes -cluster-robust- standard errors much more unreliable than their default counterparts.
      Therefore, if you really have two panels, stick with default standard errors.
      Yes! I only have two panels, one for Malaysia and the other one for Mexico.

      One question: is the use of "xtgls" advisable here as well??

      PD: This is the residual plot after running the following code:

      Code:
      xtreg ln_co2pc ln_gdppc, fe
      predict pred_
      predict resid_, residuals
      scatter resid_ pred_
      Click image for larger version

Name:	residuals.png
Views:	1
Size:	14.8 KB
ID:	1717619




      I am not sure if there is evidence of heteroskedasticity here or not, just to make sure regarding the choice of including "robust" or not
      Last edited by sladmin; 02 Mar 2024, 08:16. Reason: anonymize original poster

      Comment


      • #4
        Guest:
        I would stick with heteroskedastcity-robust standard errors.
        If you have a T>N panel dataset you sould stick with -xtgls-.
        Last edited by sladmin; 02 Mar 2024, 08:16. Reason: anonymize original poster
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Guest:
          I would stick with heteroskedastcity-robust standard errors.
          If you have a T>N panel dataset you sould stick with -xtgls-.
          One question, Carlo
          I am currently running the regressions for my case study (two countries, Malaysia and Mexico over a long period of time => T>N => I am using xtgls)

          However I am getting many collinearity errors

          I do not understand how there is collinearity in all these variables, I can maybe understand it in the case of ln(gdppc)^3 or ln(gdppc)^3*LATAM, but not in the case of country fixed-effects....

          I would like to perform a comparative analysis between these two countries, hence why the inclusion of "i.country" is crucial
          (My variables of interest are those related to gdppc, trade and fdi, the rest are control variables)

          Any advice or suggestion? Thanks again.

          Code:
          .  eststo: xtgls ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3 LAgdppc LAgdppc2 LAgdppc3 $TRADE $LATRADE $CONTROL $LACONTROL i.country i.year, panels(heteroskedastic)
          note: ln_gdppc3 omitted because of collinearity
          note: 2.country omitted because of collinearity
          note: 2014.year omitted because of collinearity
          note: 2015.year omitted because of collinearity
          
          Cross-sectional time-series FGLS regression
          
          Coefficients:  generalized least squares
          Panels:        heteroskedastic
          Correlation:   no autocorrelation
          
          Estimated covariances      =         2          Number of obs     =         51
          Estimated autocorrelations =         0          Number of groups  =          2
          Estimated coefficients     =        47          Obs per group:
                                                                        min =         25
                                                                        avg =       25.5
                                                                        max =         26
                                                          Wald chi2(47)     =   1.79e+08
                                                          Prob > chi2       =     0.0000
          
          -----------------------------------------------------------------------------------
                   ln_co2pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ------------------+----------------------------------------------------------------
                   ln_gdppc |   6.414123   2.052665     3.12   0.002     2.390973    10.43727
                  ln_gdppc2 |  -.3746631   .1108793    -3.38   0.001    -.5919826   -.1573435
                  ln_gdppc3 |          0  (omitted)
                    LAgdppc |          0  (omitted)
                   LAgdppc2 |  -3.353642    1.11771    -3.00   0.003    -5.544314   -1.162971
                   LAgdppc3 |   .2375307   .0788544     3.01   0.003     .0829789    .3920825
                   ln_trade |  -.8262869   .0594918   -13.89   0.000    -.9428887   -.7096851
                     ln_fdi |   .0051527   .0051196     1.01   0.314    -.0048816     .015187
                 LAln_trade |  -.9065058   .0915867    -9.90   0.000    -1.086013   -.7269991
                   LAln_fdi |   .0432355   .0111061     3.89   0.000     .0214678    .0650031
                  ln_energy |    2.71975   .2138846    12.72   0.000     2.300544    3.138956
               ln_renewable |  -.1301955   .0293561    -4.44   0.000    -.1877324   -.0726586
             ln_fossilfuels |  -19.28762   2.615683    -7.37   0.000    -24.41427   -14.16098
                  ln_forest |  -5.967486     .70238    -8.50   0.000    -7.344125   -4.590846
              ln_population |   19.47443   1.858549    10.48   0.000     15.83174    23.11712
                ln_services |   1.621662   .3366296     4.82   0.000     .9618797    2.281443
                ln_industry |   -3.93861   .2440853   -16.14   0.000    -4.417008   -3.460212
            ln_manufactures |   2.487991    .227462    10.94   0.000     2.042173    2.933808
                   ln_urban |  -28.39038   2.520111   -11.27   0.000    -33.32971   -23.45106
                LAln_energy |  -1.643163   .3104463    -5.29   0.000    -2.251626   -1.034699
             LAln_renewable |   -.406006   .1570685    -2.58   0.010    -.7138546   -.0981575
           LAln_fossilfuels |   10.40393   3.442823     3.02   0.003     3.656121    17.15174
                LAln_forest |   24.92538   5.514072     4.52   0.000       14.118    35.73276
            LAln_population |  -1.027555   .4079067    -2.52   0.012    -1.827037   -.2280723
              LAln_services |  -7.840901    .679755   -11.53   0.000    -9.173196   -6.508605
              LAln_industry |  -.1639875   .3668085    -0.45   0.655     -.882919     .554944
          LAln_manufactures |  -1.621694   .2023318    -8.02   0.000    -2.018257    -1.22513
                 LAln_urban |          0  (omitted)
                            |
                    country |
                    Mexico  |          0  (omitted)
                            |
                       year |
                      1991  |  -.4313252   .0213973   -20.16   0.000    -.4732632   -.3893872
                      1992  |  -.4511693   .0410121   -11.00   0.000    -.5315515   -.3707871
                      1993  |  -.3796915   .0501842    -7.57   0.000    -.4780508   -.2813323
                      1994  |  -.1451903   .0575073    -2.52   0.012    -.2579024   -.0324781
                      1995  |   .2095763   .0664292     3.15   0.002     .0793775    .3397751
                      1996  |   .2628518   .0875747     3.00   0.003     .0912086     .434495
                      1997  |   .2618646   .1022731     2.56   0.010     .0614131    .4623162
                      1998  |   .3370298   .1091201     3.09   0.002     .1231584    .5509012
                      1999  |   .3193476   .1097159     2.91   0.004     .1043085    .5343867
                      2000  |    .483978   .1242691     3.89   0.000     .2404151    .7275408
                      2001  |   .2252885   .1073909     2.10   0.036     .0148062    .4357709
                      2002  |   .1849939   .1078843     1.71   0.086    -.0264555    .3964432
                      2003  |   .2139622    .109514     1.95   0.051    -.0006813    .4286057
                      2004  |   .3314125   .1079407     3.07   0.002     .1198526    .5429724
                      2005  |   .3565014     .10301     3.46   0.001     .1546054    .5583974
                      2006  |   .4199157   .0964699     4.35   0.000     .2308382    .6089932
                      2007  |   .2647672   .0885956     2.99   0.003      .091123    .4384115
                      2008  |   .4293229   .0716343     5.99   0.000     .2889223    .5697235
                      2009  |   .0781098   .0706569     1.11   0.269    -.0603752    .2165948
                      2010  |    .135703    .054894     2.47   0.013     .0281127    .2432933
                      2011  |   .1504382   .0477292     3.15   0.002     .0568907    .2439857
                      2012  |   .1410307   .0311777     4.52   0.000     .0799235    .2021379
                      2013  |  -.1815512    .015637   -11.61   0.000    -.2121991   -.1509032
                      2014  |          0  (omitted)
                      2015  |          0  (omitted)
                            |
                      _cons |          0  (omitted)
          -----------------------------------------------------------------------------------
          (est6 stored)
          
          .
          end of do-file
          Last edited by sladmin; 02 Mar 2024, 08:16. Reason: anonymize original poster

          Comment


          • #6
            Guest:
            you cannot estimate 47 coefficients with such a small sample.
            You should go for a more parsimonious specification: I'd start with dropping controls and focusing on the inependent variables that are meaningful for the data generating process that you're investigating.
            Last edited by sladmin; 02 Mar 2024, 08:16. Reason: anonymize original poster
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Guest:
              you cannot estimate 47 coefficients with such a small sample.
              You should go for a more parsimonious specification: I'd start with dropping controls and focusing on the inependent variables that are meaningful for the data generating process that you're investigating.
              Thanks for your prompt response.

              However, if I only leave my interest variables, I still get collinearity issues.

              I think that country-fixed effects and time-fixed effects are crucial in my analysis and I cannot drop them.

              Code:
              eststo: xtgls ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3 LAgdppc LAgdppc2 LAgdppc3 $TRADE $LATRADE i.country i.year, panels(heteroskedastic)
              note: ln_gdppc3 omitted because of collinearity
              note: 2.country omitted because of collinearity
              
              Cross-sectional time-series FGLS regression
              
              Coefficients:  generalized least squares
              Panels:        heteroskedastic
              Correlation:   no autocorrelation
              
              Estimated covariances      =         2          Number of obs     =         58
              Estimated autocorrelations =         0          Number of groups  =          2
              Estimated coefficients     =        38          Time periods      =         29
                                                              Wald chi2(37)     =    3968.99
                                                              Prob > chi2       =     0.0000
              
              ------------------------------------------------------------------------------
                  ln_co2pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
              -------------+----------------------------------------------------------------
                  ln_gdppc |   69.54423   9.337891     7.45   0.000      51.2423    87.84616
                 ln_gdppc2 |  -3.665492   .5007764    -7.32   0.000    -4.646995   -2.683988
                 ln_gdppc3 |          0  (omitted)
                   LAgdppc |  -51.14176   16.65684    -3.07   0.002    -83.78856   -18.49496
                  LAgdppc2 |   10.73937   3.565764     3.01   0.003     3.750597    17.72813
                  LAgdppc3 |  -.5732345   .1901779    -3.01   0.003    -.9459762   -.2004927
                  ln_trade |  -1.212687   .2807439    -4.32   0.000    -1.762935   -.6624395
                    ln_fdi |  -.0300869    .017992    -1.67   0.094    -.0653506    .0051768
                LAln_trade |    1.39711   .2506932     5.57   0.000     .9057599    1.888459
                  LAln_fdi |   .1384944   .0671078     2.06   0.039     .0069655    .2700233
                           |
                   country |
                   Mexico  |          0  (omitted)
                           |
                      year |
                     1991  |   -.269364    .058963    -4.57   0.000    -.3849294   -.1537986
                     1992  |  -.4462607   .0638866    -6.99   0.000    -.5714762   -.3210452
                     1993  |  -.4614591   .0719368    -6.41   0.000    -.6024526   -.3204656
                     1994  |   -.512997   .0923255    -5.56   0.000    -.6939517   -.3320423
                     1995  |   -.541952   .0991087    -5.47   0.000    -.7362015   -.3477025
                     1996  |  -.7102311   .1099455    -6.46   0.000    -.9257203   -.4947418
                     1997  |   -.734811   .1267476    -5.80   0.000    -.9832318   -.4863902
                     1998  |  -.6745059   .1373733    -4.91   0.000    -.9437525   -.4052592
                     1999  |  -.7495422   .1457395    -5.14   0.000    -1.035186   -.4638981
                     2000  |  -.7084521   .1613177    -4.39   0.000    -1.024629   -.3922752
                     2001  |  -.7957778   .1599279    -4.98   0.000    -1.109231   -.4823249
                     2002  |   -.737401   .1512682    -4.87   0.000    -1.033881   -.4409209
                     2003  |  -.7246806   .1563477    -4.64   0.000    -1.031116   -.4182446
                     2004  |  -.6552442   .1782715    -3.68   0.000     -1.00465   -.3058385
                     2005  |  -.6119982   .1822888    -3.36   0.001    -.9692776   -.2547187
                     2006  |   -.490645   .1919643    -2.56   0.011    -.8668882   -.1144018
                     2007  |  -.4543116   .2063487    -2.20   0.028    -.8587476   -.0498756
                     2008  |  -.4337318   .2087476    -2.08   0.038    -.8428695   -.0245941
                     2009  |  -.6812798    .189957    -3.59   0.000    -1.053589   -.3089709
                     2010  |  -.4951623   .2106188    -2.35   0.019    -.9079676    -.082357
                     2011  |  -.3210118     .22554    -1.42   0.155    -.7630621    .1210386
                     2012  |   -.220479   .2393986    -0.92   0.357    -.6896916    .2487337
                     2013  |  -.2590334   .2582811    -1.00   0.316     -.765255    .2471882
                     2014  |    .109659    .265514     0.41   0.680    -.4107388    .6300568
                     2015  |   .1216806   .2877558     0.42   0.672    -.4423105    .6856716
                     2016  |   .1724068   .3005074     0.57   0.566    -.4165769    .7613905
                     2017  |   .2720608     .31919     0.85   0.394    -.3535402    .8976617
                     2018  |    .379593   .3377476     1.12   0.261    -.2823801    1.041566
                           |
                     _cons |  -313.4065   42.78831    -7.32   0.000      -397.27   -229.5429
              ------------------------------------------------------------------------------
              Last edited by sladmin; 02 Mar 2024, 08:16. Reason: anonymize original poster

              Comment


              • #8
                Guest:
                you should spot what is collinear with Mexico and fix the issue.
                Why a log_log model? Doesn't a log-linear one fit your research purposes?
                If that turns out to be unfeasible:
                1) delete -i.year- from the right-hand side of your regression and see what happens;
                2) keep -year- in as a continuous variable with both linear and square terma, and search for possible turnpoints
                Last edited by sladmin; 02 Mar 2024, 08:17. Reason: anonymize original poster
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Originally posted by Carlo Lazzaro View Post
                  Guest:
                  you should spot what is collinear with Mexico and fix the issue.
                  Why a log_log model? Doesn't a log-linear one fit your research purposes?
                  If that turns out to be unfeasible:
                  1) delete -i.year- from the right-hand side of your regression and see what happens;
                  2) keep -year- in as a continuous variable with both linear and square terma, and search for possible turn points
                  1. I use a log-log model because "economic activity inevitably implies the use of resources and by the laws of thermodynamics, use of resources inevitably implies the production of waste. Regressions that allow levels of indicators to become zero or negative are inappropriate except in the case of deforestation where afforestation can occur. " (Stern, 2003. https://isecoeco.org/pdf/stern.pdf) Most papers in the literature regarding this topic use log-log

                  2. I dont know what is the issue with Mexico. If I remove the interaction terms of the dummy variable with the other variables, Mexico does not get omitted and I only get a collinearity issue for ln_gdppc3

                  Code:
                   eststo: xtgls ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3 i.country i.year $TRADE, panels(heteroskedastic)
                  note: ln_gdppc3 omitted because of collinearity
                  
                  Cross-sectional time-series FGLS regression
                  
                  Coefficients:  generalized least squares
                  Panels:        heteroskedastic
                  Correlation:   no autocorrelation
                  
                  Estimated covariances      =         2          Number of obs     =         58
                  Estimated autocorrelations =         0          Number of groups  =          2
                  Estimated coefficients     =        34          Time periods      =         29
                                                                  Wald chi2(33)     =    1362.65
                                                                  Prob > chi2       =     0.0000
                  
                  ------------------------------------------------------------------------------
                      ln_co2pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                      ln_gdppc |   11.09078   10.66044     1.04   0.298    -9.803299    31.98486
                     ln_gdppc2 |  -.5712301   .5726915    -1.00   0.319    -1.693685    .5512246
                     ln_gdppc3 |          0  (omitted)
                               |
                       country |
                       Mexico  |    -1.1217   .4016916    -2.79   0.005    -1.909001   -.3343984
                               |
                          year |
                         1991  |  -.1900927   .0908447    -2.09   0.036    -.3681451   -.0120404
                         1992  |   -.259805   .0972108    -2.67   0.008    -.4503347   -.0692753
                         1993  |  -.2918861   .1090695    -2.68   0.007    -.5056584   -.0781138
                         1994  |  -.2752316   .1139671    -2.42   0.016    -.4986031   -.0518601
                         1995  |  -.2670852    .129223    -2.07   0.039    -.5203577   -.0138127
                         1996  |  -.3471327   .1459772    -2.38   0.017    -.6332427   -.0610227
                         1997  |  -.3539633   .1609955    -2.20   0.028    -.6695087   -.0384179
                         1998  |  -.3227347    .162909    -1.98   0.048    -.6420304   -.0034389
                         1999  |  -.4351739   .1774505    -2.45   0.014    -.7829706   -.0873772
                         2000  |  -.4221346   .2010249    -2.10   0.036    -.8161362    -.028133
                         2001  |  -.4217176   .1788481    -2.36   0.018    -.7722535   -.0711817
                         2002  |  -.4300627   .1869968    -2.30   0.021    -.7965696   -.0635557
                         2003  |   -.412256   .1992226    -2.07   0.039    -.8027252   -.0217868
                         2004  |  -.4256563   .2293067    -1.86   0.063    -.8750892    .0237765
                         2005  |   -.424174   .2389536    -1.78   0.076    -.8925146    .0441665
                         2006  |  -.4244701   .2617976    -1.62   0.105     -.937584    .0886438
                         2007  |  -.4493371   .2768567    -1.62   0.105    -.9919662     .093292
                         2008  |  -.4351114   .2802725    -1.55   0.121    -.9844355    .1142127
                         2009  |  -.4224221   .2445972    -1.73   0.084    -.9018238    .0569795
                         2010  |  -.4628591    .283928    -1.63   0.103    -1.019348    .0936295
                         2011  |  -.4228509   .3059353    -1.38   0.167    -1.022473    .1767713
                         2012  |  -.4135945   .3209021    -1.29   0.197    -1.042551     .215362
                         2013  |  -.4578377    .327084    -1.40   0.162    -1.098911    .1832352
                         2014  |  -.1948693   .3414384    -0.57   0.568    -.8640763    .4743377
                         2015  |  -.2255567    .362663    -0.62   0.534    -.9363631    .4852498
                         2016  |  -.2010223   .3782749    -0.53   0.595    -.9424275    .5403828
                         2017  |  -.2342825   .4034854    -0.58   0.561    -1.025099    .5565344
                         2018  |  -.1998046   .4226472    -0.47   0.636    -1.028178    .6285686
                               |
                      ln_trade |  -.2567495   .2646455    -0.97   0.332    -.7754452    .2619461
                        ln_fdi |   .0210135    .024246     0.87   0.386    -.0265077    .0685347
                         _cons |  -42.76876   48.48573    -0.88   0.378     -137.799    52.26152
                  ------------------------------------------------------------------------------
                  3. If I remove i.year from the original regression:

                  Code:
                  eststo: xtgls ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3 LAgdppc LAgdppc2 LAgdppc3 i.country $TRADE $LATRADE, panels(heteroskedastic)
                  note: ln_gdppc3 omitted because of collinearity
                  note: 2.country omitted because of collinearity
                  
                  Cross-sectional time-series FGLS regression
                  
                  Coefficients:  generalized least squares
                  Panels:        heteroskedastic
                  Correlation:   no autocorrelation
                  
                  Estimated covariances      =         2          Number of obs     =         58
                  Estimated autocorrelations =         0          Number of groups  =          2
                  Estimated coefficients     =        10          Time periods      =         29
                                                                  Wald chi2(9)      =    1139.19
                                                                  Prob > chi2       =     0.0000
                  
                  ------------------------------------------------------------------------------
                      ln_co2pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                      ln_gdppc |    11.3543   5.411696     2.10   0.036     .7475733    21.96103
                     ln_gdppc2 |  -.5995045   .2839269    -2.11   0.035    -1.155991    -.043018
                     ln_gdppc3 |          0  (omitted)
                       LAgdppc |   28.41454    10.9971     2.58   0.010     6.860616    49.96846
                      LAgdppc2 |  -6.189825   2.328628    -2.66   0.008    -10.75385   -1.625798
                      LAgdppc3 |   .3292062   .1233651     2.67   0.008      .087415    .5709974
                               |
                       country |
                       Mexico  |          0  (omitted)
                      ln_trade |  -1.021678   .1784642    -5.72   0.000    -1.371462   -.6718949
                        ln_fdi |   .0099458   .0144114     0.69   0.490    -.0183001    .0381917
                    LAln_trade |    1.06762   .2816481     3.79   0.000     .5155998     1.61964
                      LAln_fdi |   .0521315   .0947787     0.55   0.582    -.1336314    .2378944
                         _cons |  -39.07848   24.95271    -1.57   0.117    -87.98489     9.82793
                  ------------------------------------------------------------------------------

                  4. If I keep "year", the same happens: Mexico and LAgdppc3 get omitted
                  Last edited by sladmin; 02 Mar 2024, 08:17. Reason: anonymize original poster

                  Comment


                  • #10
                    Guest:
                    get rid of interaction, then.
                    Last edited by sladmin; 02 Mar 2024, 08:17. Reason: anonymize original poster
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Originally posted by Carlo Lazzaro View Post
                      Guest:
                      get rid of interaction, then.
                      Thanks for your reply.
                      Then, I should remove both ln_gdppc3 and ln_gdppc3 * Mexico, right?
                      Doesnt that have implications? Because in the regression with only the GDPpc variables I obtain that both cubic terms are significant:

                      Code:
                       eststo: xtgls ln_co2pc ln_gdppc ln_gdppc2 ln_gdppc3 LAgdppc LAgdppc2 LAgdppc3 i.country, panels(heteroskedastic)
                      
                      Cross-sectional time-series FGLS regression
                      
                      Coefficients:  generalized least squares
                      Panels:        heteroskedastic
                      Correlation:   no autocorrelation
                      
                      Estimated covariances      =         2          Number of obs     =        118
                      Estimated autocorrelations =         0          Number of groups  =          2
                      Estimated coefficients     =         8          Time periods      =         59
                                                                      Wald chi2(7)      =     868.61
                                                                      Prob > chi2       =     0.0000
                      
                      ------------------------------------------------------------------------------
                          ln_co2pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                          ln_gdppc |   169.8577   24.78828     6.85   0.000     121.2736    218.4419
                         ln_gdppc2 |  -18.64872   2.776979    -6.72   0.000     -24.0915   -13.20594
                         ln_gdppc3 |   .6804565   .1033753     6.58   0.000     .4778445    .8830684
                           LAgdppc |  -1067.951   155.6252    -6.86   0.000    -1372.971   -762.9312
                          LAgdppc2 |   117.5212   17.10762     6.87   0.000     83.99088    151.0515
                          LAgdppc3 |  -4.303187   .6262554    -6.87   0.000    -5.530625   -3.075749
                                   |
                           country |
                           Mexico  |   3228.067   471.4334     6.85   0.000     2304.075     4152.06
                             _cons |  -504.6964   73.52125    -6.86   0.000    -648.7954   -360.5974
                      ------------------------------------------------------------------------------
                      (est6 stored)
                      Last edited by sladmin; 02 Mar 2024, 08:17. Reason: anonymize original poster

                      Comment


                      • #12
                        Guest:
                        and what are the practical implication of having both cubic terms significant according to your theoretical framework?
                        Last edited by sladmin; 02 Mar 2024, 08:18. Reason: anonymize original poster
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Originally posted by Carlo Lazzaro View Post
                          Guest:
                          and what are the practical implication of having both cubic terms significant according to your theoretical framework?
                          Significant cubic terms imply an N-shaped Environmental Kuznets Curve.
                          However, it may be the case that once control variables are included, then they become insignificant and/or collinear.
                          Last edited by sladmin; 02 Mar 2024, 08:18. Reason: anonymize original poster

                          Comment


                          • #14
                            Originally posted by Guest

                            Significant cubic terms imply an N-shaped Environmental Kuznets Curve.
                            However, it may be the case that once control variables are included, then they become insignificant and/or collinear.
                            PS: I should not include control variables, right? Only the variables of interest (as you wrote in #6)
                            Last edited by sladmin; 02 Mar 2024, 08:18. Reason: anonymize original poster

                            Comment


                            • #15
                              Guest:
                              yes, I meant it, as you have too many predictors in the hand-side of your regression equation.
                              Last edited by sladmin; 02 Mar 2024, 08:18. Reason: anonymize original poster
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X