Announcement

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

  • Regression model with dummy variable in panel data

    Hello everyone,

    I am trying to assess differences in COVID-19 outcomes (such as COVID-19 cases and deaths), among countries, based on their government system (either federal or unitary). To do that I am making use of panel data and I would perform regressions. I show here a portion of my dataset:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str8 country str3 date float(country_system total_cases_per_million total_deaths_per_million aged_70_older gdp_per_capita stringency_index) double new_tests_per_thousand
    "ARG" "720" 1         .        .  7.441 18933.906  3.225484  .009000000427477062
    "ARG" "721" 1         .        .  7.441 18933.906     11.11 .0010000000474974513
    "ARG" "722" 1    23.321     .597  7.441 18933.906  51.70258   .14600000076461583
    "ARG" "723" 1    97.974    4.823  7.441 18933.906    98.457   1.3300000000745058
    "ARG" "724" 1   372.845   11.926  7.441 18933.906  90.26258                2.875
    "ARG" "725" 1  1427.788   28.919  7.441 18933.906  89.13667    5.419000014662743
    "ARG" "726" 1  4232.741   78.392  7.441 18933.906  91.51548    9.875000014901161
    "ARG" "727" 1  9242.788  191.611  7.441 18933.906  88.25935   14.580000042915344
    "ARG" "728" 1  16616.62  374.747  7.441 18933.906     87.96   17.337999939918518
    "ARG" "729" 1 25819.314  685.949  7.441 18933.906  83.95871   17.764000058174133
    "ARG" "730" 1  31519.16  856.938  7.441 18933.906  79.63167   13.205000013113022
    "ARG" "731" 1  35966.06  956.837  7.441 18933.906     79.17    15.27199998497963
    "ARG" "732" 1  42642.02 1061.471  7.441 18933.906     79.17   24.611000046133995
    "ARG" "733" 1  46627.48 1149.776  7.441 18933.906  78.43929   21.663000136613846
    "ARG" "734" 1  51969.92 1235.912  7.441 18933.906 72.699356    22.41499999165535
    "ARG" "735" 1  63299.81 1363.933  7.441 18933.906     71.76     16.5939998626709
    "AUS" "720" 1      .353        . 10.129  44648.71     11.11                    0
    "AUS" "721" 1       .98        . 10.129  44648.71     19.44                    0
    "AUS" "722" 1   178.785     .706 10.129  44648.71  38.20032                    0
    "AUS" "723" 1   265.335    3.647 10.129  44648.71  71.48067   10.448999986052513
    "AUS" "724" 1   282.433    4.039 10.129  44648.71  67.35226   34.937000036239624
    "AUS" "725" 1    310.59    4.078 10.129  44648.71  55.01433     39.2709998190403
    "AUS" "726" 1    677.65    7.882 10.129  44648.71  69.81935      62.639000415802
    "AUS" "727" 1  1012.515   25.765 10.129  44648.71  75.10194    59.37099993228912
    "AUS" "728" 1  1062.593   34.824 10.129  44648.71     74.72   30.092000126838684
    "AUS" "729" 1  1082.162   35.569 10.129  44648.71  65.66968    22.57699978351593
    "AUS" "730" 1  1094.593   35.608 10.129  44648.71  52.76067   27.038000166416168
    "AUS" "731" 1  1114.711   35.647 10.129  44648.71 65.993225   23.894999980926514
    "AUS" "732" 1  1130.123   35.647 10.129  44648.71  60.67516    30.39299976825714
    "AUS" "733" 1  1136.397   35.647 10.129  44648.71  62.46643    25.47699999809265
    "AUS" "734" 1  1149.888   35.647 10.129  44648.71     50.91   16.096999943256378
    "AUS" "735" 1  1163.927   35.686 10.129  44648.71    47.278   18.580000042915344
    "AUT" "720" 1         .        . 13.748  45436.69         .                    0
    "AUT" "721" 1      .999        . 13.748  45436.69     11.11                    0
    "AUT" "722" 1  1130.307   14.212 13.748  45436.69  52.92613                    0
    "AUT" "723" 1  1715.669   64.843 13.748  45436.69    78.642    26.59999969601631
    "AUT" "724" 1  1857.679   74.169 13.748  45436.69  60.60193   21.332999974489212
    "AUT" "725" 1  1972.597   78.278 13.748  45436.69  50.24667   18.233000099658966
    "AUT" "726" 1  2346.109   79.721 13.748  45436.69  39.03709   30.833000123500824
    "AUT" "727" 1    3046.5   81.387 13.748  45436.69     37.96    32.22900000214577
    "AUT" "728" 1  4975.684   88.715 13.748  45436.69    37.099    48.55199992656708
    "AUT" "729" 1  11650.05  123.135 13.748  45436.69  51.16549     68.2590000629425
    "AUT" "730" 1   31361.7  353.526 13.748  45436.69  78.11833    96.10800004005432
    "AUT" "731" 1  40062.07  690.842 13.748  45436.69  75.60065    82.01200008392334
    "AUT" "732" 1   46011.5  857.279 13.748  45436.69     82.41    621.3060022592545
    "AUT" "733" 1  51012.61  950.546 13.748  45436.69  77.68072    616.4529972076416
    "AUT" "734" 1  60648.98 1036.929 13.748  45436.69  73.64323     948.628002166748
    "AUT" "735" 1  67616.25 1119.981 13.748  45436.69  76.50565    682.4149961471558
    "BEL" "720" 1         .        . 12.849  42658.57         .                    0
    "BEL" "721" 1      .086        . 12.849  42658.57     11.11                    0
    "BEL" "722" 1   1102.28    60.83 12.849  42658.57  49.22323    5.964999980293214
    "BEL" "723" 1   4186.42  655.242 12.849  42658.57     81.48   29.173000007867813
    "BEL" "724" 1  5037.354  816.852 12.849  42658.57  76.55226   42.566000163555145
    "BEL" "725" 1  5300.176  841.011 12.849  42658.57  57.06667    32.24299994111061
    "BEL" "726" 1  5932.121  849.122 12.849  42658.57  51.34387   37.502999782562256
    "BEL" "727" 1  7354.515  862.496 12.849  42658.57  59.01807    51.99800008535385
    "BEL" "728" 1 10220.528  864.222 12.849  42658.57  52.59467    84.97600030899048
    "BEL" "729" 1 37035.652 1003.053 12.849  42658.57  49.90968   148.70399951934814
    "BEL" "730" 1  49815.71 1436.199 12.849  42658.57  64.50633     78.7229995727539
    "BEL" "731" 1  55782.35 1684.957 12.849  42658.57     60.19    89.08400005102158
    "BEL" "732" 1  61274.94 1819.905 12.849  42658.57  60.63677   114.38999915122986
    "BEL" "733" 1  66569.16 1904.895 12.849  42658.57     62.96   103.30099940299988
    "BEL" "734" 1 76141.695 1985.916 12.849  42658.57   63.6771   151.20799911022186
    "BEL" "735" 1  84076.81  2072.89 12.849  42658.57  71.53167    79.00800001621246
    "BGR" "720" 0         .        . 13.272 18563.307         .                    0
    "BGR" "721" 0         .        . 13.272 18563.307         .                    0
    "BGR" "722" 0    57.423    1.151 13.272 18563.307    58.065                    0
    "BGR" "723" 0   216.739    9.499 13.272 18563.307  72.28667                    0
    "BGR" "724" 0   361.664   20.148 13.272 18563.307  61.23097   4.5290000177919865
    "BGR" "725" 0   718.002   33.101 13.272 18563.307    39.443    6.953999996185303
    "BGR" "726" 0  1682.391    55.12 13.272 18563.307 37.633224   16.105999991297722
    "BGR" "727" 0  2340.955   90.524 13.272 18563.307  39.15903    17.88699994981289
    "BGR" "728" 0  2998.225  118.732 13.272 18563.307 36.916664    12.54399998486042
    "BGR" "729" 0  7605.155   184.07 13.272 18563.307 37.249355   27.395000010728836
    "BGR" "730" 0 20911.154  580.705 13.272 18563.307    49.261    36.22800004482269
    "BGR" "731" 0 29109.535 1090.316 13.272 18563.307     53.91   22.948999918997288
    "BGR" "732" 0 31481.576  1301.73 13.272 18563.307      53.7    34.54800011217594
    "BGR" "733" 0 35552.992 1466.659 13.272 18563.307      53.7    28.71500000357628
    "BGR" "734" 0  49310.75 1899.274 13.272 18563.307  55.55452    27.76800027489662
    "BGR" "735" 0  57207.04 2289.289 13.272 18563.307      53.7    42.14699983596802
    "BIH" "720" 0         .        . 10.711 11713.895         .                    0
    "BIH" "721" 0         .        . 10.711 11713.895         .                    0
    "BIH" "722" 0   128.017    3.962 10.711 11713.895  60.59481                    0
    "BIH" "723" 0   535.538   21.031 10.711 11713.895  91.32433    8.330000072717667
    "BIH" "724" 0   765.054   46.635 10.711 11713.895  79.36097    10.49300005286932
    "BIH" "725" 0  1357.285   56.693 10.711 11713.895    52.962    5.308000028133392
    "BIH" "726" 0  3619.832  103.328 10.711 11713.895      56.6   7.0019999742507935
    "BIH" "727" 0  6085.073  185.625 10.711 11713.895  57.04839    9.232999980449677
    "BIH" "728" 0  8372.615  260.911 10.711 11713.895    41.852   10.772000074386597
    "BIH" "729" 0 15267.548  376.126 10.711 11713.895   41.2771   18.239000041037798
    "BIH" "730" 0  26792.43  817.175 10.711 11713.895     47.53   31.345999717712402
    "BIH" "731" 0 33828.484 1234.449 10.711 11713.895  46.05677    29.34599980711937
    "BIH" "732" 0 37032.566  1426.17 10.711 11713.895     42.59   -7.527000188827515
    "BIH" "733" 0   39922.7 1545.653 10.711 11713.895     42.59   12.997999966144562
    "BIH" "734" 0   51702.4  2011.39 10.711 11713.895     42.59   28.668000280857086
    "BIH" "735" 0  59355.07 2500.293 10.711 11713.895  44.40304   18.794000029563904
    "BRA" "720" 1         .        .   5.06 14103.452         .                    0
    "BRA" "721" 1      .009        .   5.06 14103.452      5.56                    0
    "BRA" "722" 1    26.896     .946   5.06 14103.452  43.99645                    0
    "BRA" "723" 1   410.177   28.256   5.06 14103.452  75.00166                    0
    end

    The date includes years and months from 720=2020m1 to 735=2021m4 (even though here they are displayed as integers); country_system is equal to 1 if the country has a federal system 0 otherwise; total_cases_per_million and total_deaths_per_million would be my control variables, and the rest of the variables are controls.

    Because of colinearity, I cannot use - xtreg, fe -. However, the dummy variable country_system is crucial for this analysis. Therefore, I would like to ask if there is anyone to know how to address this problem in this context and if it would be needed to specify a different model.
    Thank you in advance to whoever is willing to take the time to help.
    Best regards

    Alessio Lombini

  • #2
    Hi Alessio,

    I don't fully understand why you can't use xtreg, fe? Such as in a two-way fixed effects model:

    Code:
    xtreg total_cases_per_million i.country_system i.date gdp_per_capita, fe cluster(country)
    Obviously, this same model can be re-written to be estimated using OLS, by including a country dummy (although you'll have some issues with standard errors which will need to be adjusted):

    Code:
    reg total_cases_per_million i.country_system i.date i.country gdp_per_capita, cluster(country)
    Best,
    Rhys

    Comment


    • #3
      Alessio:
      as Rhys wisely recommended, there's so much to gain in prefering -xtreg- to -regress- if you're dealing with a panel dataset.
      At the top of that, you seem to complain about an expected behaviour of the -fe- estimator, that is wiping out time-invariant variables.
      What I fail to get is the aim of your reserach: are you interested in within-panel variations (that call for -fe- estimator) or between-panel variations (for which -re- specification is the way to go).
      Eventually, have you already run -hausman- (if you keep default standard errors) or the community-contributed module -xtoverid- if, as more advisable, you switched to non-default stndard errors)?
      As an aside, take a look at the community-contributed programme -mundlak-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you both for the time you took to answer and for your useful suggestions.

        ,I tried the approach you proposed by Rhys, obtaining the following results:

        Code:
        . xtreg total_cases_per_million i.country_system i.date stringency_index gdp_per_capita
        > , fe cluster(country)
        note: 1.country_system omitted because of collinearity
        note: gdp_per_capita omitted because of collinearity
        
        Fixed-effects (within) regression               Number of obs      =       732
        Group variable: n_country                       Number of groups   =        49
        
        R-sq:  within  = 0.7172                         Obs per group: min =        14
               between = 0.0490                                        avg =      14.9
               overall = 0.5864                                        max =        16
        
                                                        F(16,48)           =     12.89
        corr(u_i, Xb)  = -0.0194                        Prob > F           =    0.0000
        
                                           (Std. Err. adjusted for 49 clusters in country)
        ----------------------------------------------------------------------------------
                         |               Robust
        total_cases_pe~n |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -----------------+----------------------------------------------------------------
        1.country_system |          0  (omitted)
                         |
                    date |
                    721  |    -7398.8    2368.42    -3.12   0.003    -12160.83   -2636.773
                    722  |  -21194.91   4524.426    -4.68   0.000    -30291.87   -12097.94
                    723  |  -31955.61   6849.469    -4.67   0.000    -45727.39   -18183.83
                    724  |  -28212.94   6088.049    -4.63   0.000    -40453.78    -15972.1
                    725  |   -22625.1   5069.621    -4.46   0.000    -32818.25   -12431.94
                    726  |  -19931.87   4842.936    -4.12   0.000    -29669.24   -10194.49
                    727  |  -18681.33   4996.641    -3.74   0.000    -28727.75    -8634.91
                    728  |  -15795.82   4891.059    -3.23   0.002    -25629.96    -5961.69
                    729  |  -10843.38   4853.916    -2.23   0.030    -20602.84   -1083.932
                    730  |  -5491.673     5299.4    -1.04   0.305    -16146.83    5163.485
                    731  |   1857.587   5633.494     0.33   0.743    -9469.312    13184.49
                    732  |   8749.408   6006.308     1.46   0.152    -3327.084     20825.9
                    733  |   14244.67   6034.025     2.36   0.022     2112.455    26376.89
                    734  |   22268.79   6038.183     3.69   0.001     10128.21    34409.37
                    735  |   28144.14   6274.714     4.49   0.000     15527.99     40760.3
                         |
        stringency_index |   389.1536   84.44755     4.61   0.000     219.3604    558.9467
          gdp_per_capita |          0  (omitted)
                   _cons |    2521.93   2712.151     0.93   0.357    -2931.216    7975.075
        -----------------+----------------------------------------------------------------
                 sigma_u |  11078.061
                 sigma_e |  12774.002
                     rho |  .42925518   (fraction of variance due to u_i)
        ----------------------------------------------------------------------------------
        r; t=0.46 9:04:54
        The aim of my research is to assess if I have significant differences in COVID-19 cases and deaths among countries with different government system (identified by the dummy variable "country_system"). Therefore, I cannot exclude "country_system" from my model. In this sense, if I am not wrong, I am interested in the overall variation, namely in variation over time and individuals.

        Carlo, I also looked at the hints you provided. However, since I cannot estimate the model with fixed effects properly (because of collinearity), I am not able to test to employ the hausman test.
        I hope I provided you with all information you needed for a better understanding.

        Thank you again for your time.

        Comment


        • #5
          Alessio:
          if you're interested in between-panel variations, why going -fe-?
          That said, you can run -xoverid- even when -fe- and -re- specifications do not give back the same number of coefficients (see the toy example below, where -xtreg- codes are prefixed by -xi:- since the community-contributed -xtoverid- command, being a bit old-fashioned, does not support -fvvarlist- notation):
          Code:
          . use "https://www.stata-press.com/data/r16/nlswork.dta"
          (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
          
          . xi: xtreg ln_wage i.race age , fe vce(cluster idcode)
          i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
          note: _Irace_2 omitted because of collinearity
          note: _Irace_3 omitted because of collinearity
          
          Fixed-effects (within) regression               Number of obs     =     28,510
          Group variable: idcode                          Number of groups  =      4,710
          
          R-sq:                                           Obs per group:
               within  = 0.1026                                         min =          1
               between = 0.0877                                         avg =        6.1
               overall = 0.0774                                         max =         15
          
                                                          F(1,4709)         =     884.05
          corr(u_i, Xb)  = 0.0314                         Prob > F          =     0.0000
          
                                       (Std. Err. adjusted for 4,710 clusters in idcode)
          ------------------------------------------------------------------------------
                       |               Robust
               ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
              _Irace_2 |          0  (omitted)
              _Irace_3 |          0  (omitted)
                   age |   .0181349   .0006099    29.73   0.000     .0169392    .0193306
                 _cons |   1.148214   .0177153    64.81   0.000     1.113483    1.182944
          -------------+----------------------------------------------------------------
               sigma_u |  .40635023
               sigma_e |  .30349389
                   rho |  .64192015   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          . estimate store fe
          
          . xi: xtreg ln_wage i.race age , re vce(cluster idcode)
          i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
          
          Random-effects GLS regression                   Number of obs     =     28,510
          Group variable: idcode                          Number of groups  =      4,710
          
          R-sq:                                           Obs per group:
               within  = 0.1026                                         min =          1
               between = 0.1032                                         avg =        6.1
               overall = 0.0945                                         max =         15
          
                                                          Wald chi2(3)      =    1159.44
          corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
          
                                       (Std. Err. adjusted for 4,710 clusters in idcode)
          ------------------------------------------------------------------------------
                       |               Robust
               ln_wage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
              _Irace_2 |  -.1209428   .0127181    -9.51   0.000    -.1458698   -.0960158
              _Irace_3 |   .0981941   .0623336     1.58   0.115    -.0239775    .2203658
                   age |    .018534   .0005685    32.60   0.000     .0174198    .0196482
                 _cons |    1.15423   .0162744    70.92   0.000     1.122333    1.186127
          -------------+----------------------------------------------------------------
               sigma_u |  .36581626
               sigma_e |  .30349389
                   rho |  .59231394   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          . estimate store re
          
          . xtoverid
          
          Test of overidentifying restrictions: fixed vs random effects
          Cross-section time-series model: xtreg re  robust cluster(idcode)
          Sargan-Hansen statistic  12.062  Chi-sq(1)    P-value = 0.0005
          
          .
          Last edited by Carlo Lazzaro; 28 Apr 2021, 03:32.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Sorry Alessio, I hadn't thought properly that country_system doesn't have any variation, so I think you are right that this isn't in fact the best approach.

            Carlo Lazzaro provides some useful ideas to proceed

            Best,
            Rhys

            Comment


            • #7
              Dear Carlo Lazzaro,
              I followed the approach you suggested and I obtained a p-value equal to 0. Normally, I should opt for a fixed-effect model since the estimates from FE are statistically different from those of RE. However, this would imply excluding from my model the binary variable country_system, which is crucial in this analysis. In such cases, might it be justified to continue with a random-effects model anyway? Is that a huge weakness in a study? I tried to get more hints in previous posts and others forum but the suggestions are mixed. I also attach here the code I used:

              Code:
              . xi: xtreg total_cases_per_million country_system  total_tests_per_thousand people_vacci
              > nated_perhundred  population_density median_age aged_70_older gdp_per_capita extreme_po
              > verty cardiovasc_death_rate diabetes_prevalence female_smokers male_smokers hospital_be
              > ds_per_thousand life_expectancy human_development_index i.date, re vce(cluster country)
              i.date            _Idate_721-735      (naturally coded; _Idate_721 omitted)
              
              Random-effects GLS regression                   Number of obs     =        900
              Group variable: n_country                       Number of groups  =         68
              
              R-sq:                                           Obs per group:
                   within  = 0.7298                                         min =          1
                   between = 0.6098                                         avg =       13.2
                   overall = 0.6759                                         max =         15
              
                                                              Wald chi2(29)     =     575.36
              corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
              
                                                       (Std. Err. adjusted for 68 clusters in country)
              ----------------------------------------------------------------------------------------
                                     |               Robust
              total_cases_per_mill~n |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
              -----------------------+----------------------------------------------------------------
                      country_system |   706.0498   2790.171     0.25   0.800    -4762.585    6174.684
              total_tests_per_thou~d |   12.05762   3.922327     3.07   0.002         4.37    19.74524
              people_vaccinated_pe~d |   32.37998    6.67871     4.85   0.000     19.28995    45.47002
                  population_density |   -4.62444   2.348707    -1.97   0.049    -9.227821   -.0210593
                          median_age |  -111.4273   428.9778    -0.26   0.795    -952.2084    729.3538
                       aged_70_older |   549.7149   781.7899     0.70   0.482    -982.5651    2081.995
                      gdp_per_capita |  -.1584231   .1534166    -1.03   0.302    -.4591142    .1422679
                     extreme_poverty |  -2.677037   70.51222    -0.04   0.970    -140.8784    135.5244
               cardiovasc_death_rate |   14.32937   15.17823     0.94   0.345    -15.41941    44.07815
                 diabetes_prevalence |   276.5069   535.0738     0.52   0.605    -772.2185    1325.232
                      female_smokers |   140.5338   198.8347     0.71   0.480    -249.1751    530.2427
                        male_smokers |  -46.14378   98.30013    -0.47   0.639    -238.8085    146.5209
              hospital_beds_per_th~d |  -460.7284   662.2994    -0.70   0.487    -1758.811    837.3547
                     life_expectancy |   165.1168   508.1894     0.32   0.745     -830.916     1161.15
              human_development_in~x |   33838.79   32213.65     1.05   0.294     -29298.8    96976.38
                          _Idate_722 |  -2463.491   1773.227    -1.39   0.165    -5938.952    1011.969
                          _Idate_723 |   -2292.08   1765.603    -1.30   0.194    -5752.598    1168.439
                          _Idate_724 |  -1844.707    1742.73    -1.06   0.290    -5260.395    1570.981
                          _Idate_725 |  -1507.383    1710.88    -0.88   0.378    -4860.646    1845.879
                          _Idate_726 |  -568.2456   1710.892    -0.33   0.740    -3921.532    2785.041
                          _Idate_727 |   417.3943   1726.646     0.24   0.809    -2966.769    3801.558
                          _Idate_728 |   1686.252   1842.702     0.92   0.360    -1925.378    5297.882
                          _Idate_729 |    4612.45   1993.814     2.31   0.021     704.6474    8520.253
                          _Idate_730 |   9464.038   2298.535     4.12   0.000     4958.992    13969.08
                          _Idate_731 |   14518.72   2740.171     5.30   0.000     9148.079    19889.35
                          _Idate_732 |    18349.3   3074.873     5.97   0.000     12322.66    24375.94
                          _Idate_733 |   19216.58   3229.444     5.95   0.000     12886.99    25546.17
                          _Idate_734 |    19436.4   3509.756     5.54   0.000      12557.4    26315.39
                          _Idate_735 |   19696.91   3779.237     5.21   0.000     12289.74    27104.07
                               _cons |  -35915.24   28571.92    -1.26   0.209    -91915.17    20084.69
              -----------------------+----------------------------------------------------------------
                             sigma_u |  8712.6114
                             sigma_e |  9748.0338
                                 rho |   .4440878   (fraction of variance due to u_i)
              ----------------------------------------------------------------------------------------
              r; t=0.75 9:09:43
              
              . 
              . 
              . estimate store re
              r; t=0.00 9:09:43
              
              . 
              . xtoverid // according to the results, I shouls use a fixed effects model. However, this
              >  would unable me to include the dummy country_system. Therefore, I must continue with t
              > he random effect model. How we should deal with this issue?
              
              Test of overidentifying restrictions: fixed vs random effects
              Cross-section time-series model: xtreg re  robust cluster(country)
              Sargan-Hansen statistic  66.967  Chi-sq(10)   P-value = 0.0000
              r; t=0.97 9:09:44
              I would be extremely grateful for any further hint/comment you may provide.
              Best regards

              Alessio Lombini

              Comment


              • #8
                Alessio:
                - first, test whether a panel-wis eeffect does exist via -xttets0- after -xtreg,re-.
                See also the community-contributed module -mundlak-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X