Announcement

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

  • Correlated Random Effects vs Random Effects

    Hello!

    I am using Stata 19, and I am a having a tough time interpreting my correlated random effects output, especially in light of what is indicated by my descriptive statistics, and my RE estimates (xtreg, re), which the Mundlak test indicates to be efficient.

    My primary independent variable of interest is TS_ce, a categorical indicator that distinguishes between six different excise tax structure groupings. I am interested in understanding how different tax structures influence price dispersion, which is the share of cheapest brand price in premium brand price (the higher the % the smaller the gap). I have an unbalanced panel of country-level data: 910 observations from 180 countries. Data are available every two years over the period 2014-2024 (i.e., T=6).

    My data are xtset, where id= country, as follows:
    Code:
    xtset id year, delta(2)
    This is what my data look like:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    
    clear
    
    input float id double price_dispersion_use float TS_ce byte POWE double unem float(income region_id) int year
    
     1  44.44444444444444 1 18            18.055 3 4 2014
    
     1 56.666666666666664 1 18            15.418 3 4 2016
    
     1               62.5 1 18            12.304 3 4 2018
    
     1  60.60606060606061 1 19             11.69 3 4 2020
    
     1                 60 1 19            10.137 3 4 2022
    
     1                 50 1 19             10.25 3 4 2024
    
     2  33.33333333333333 4 12            10.207 3 1 2014
    
     2 35.714285714285715 6 12            10.202 3 1 2016
    
     2                 15 6 13            12.137 3 1 2018
    
     2                 50 6 13            14.057 3 1 2020
    
     2  48.57142857142857 3 13            12.346 3 1 2022
    
     2 42.857142857142854 6 13            11.427 3 1 2024
    
     3  72.85714285714285 4 11               5.3 1 4 2014
    
     3  72.85714285714285 4 11               3.3 1 4 2016
    
     3  77.77777777777777 1 11               1.8 1 4 2018
    
     3  68.44993141289439 1 11               2.9 1 4 2020
    
     3  69.86301369863014 1 11               2.1 1 4 2022
    
     3  59.09090909090908 1 11               1.4 1 4 2024
    
     4                 25 2 13             16.69 3 1 2020
    
     4                 25 2 13            14.602 3 1 2022
    
     4  28.57142857142857 2 13            14.464 3 1 2024
    
     5                 40 2 16 7.423938916311391 1 2 2024
    
     6 41.935483870967744 2 18             7.268 3 2 2014
    
     6              37.75 2 18             8.085 3 2 2016
    
     6  45.34920634920635 2 18              9.22 3 2 2018
    
     6 18.726114649681527 2 18            11.461 3 2 2020
    
     6 13.384615384615383 2 18             6.805 3 2 2022
    
     6 40.055248618784525 2 18             7.876 3 2 2024
    
     7                 30 4 13            17.498 3 4 2014
    
     7 26.666666666666668 4 14            17.617 3 4 2016
    
     7 42.857142857142854 2 14            18.966 3 4 2018
    
     7               47.5 1 18            18.175 3 4 2020
    
     7  48.23529411764706 1 19            13.379 3 4 2022
    
     7                 35 1 19            13.329 3 4 2024
    
     8  78.93318965517241 1 19             6.078 1 6 2014
    
     8  73.84341637010677 1 19             5.711 1 6 2016
    
     8  82.34126984126985 1 19               5.3 1 6 2018
    
     8  71.02189781021899 4 18             6.456 1 6 2020
    
     8  68.45524542829644 4 18             3.728 1 6 2022
    
     8  60.58098915241773 4 18             4.072 1 6 2024
    
     9  80.61224489795919 3 13             5.674 1 4 2014
    
     9                 80 3 15             6.064 1 4 2016
    
     9                 80 3 15             4.933 1 4 2018
    
     9  82.45614035087719 3 17             5.201 1 4 2020
    
     9  68.35820895522387 3 16             4.992 1 4 2022
    
     9  83.07692307692308 3 16             5.439 1 4 2024
    
    10                 24 4 12              4.91 3 4 2014
    
    10              56.25 1 13                 5 3 4 2016
    
    10 23.076923076923077 4 14               4.9 3 4 2018
    
    10  47.05882352941177 4 14              7.24 3 4 2020
    
    10  55.55555555555556 4 14              5.65 3 4 2022
    
    10  48.88888888888889 1 14             5.594 3 4 2024
    
    11 48.658536585365916 1 10              13.8 1 2 2014
    
    11  40.22346368715088 1 10              12.7 1 2 2016
    
    11  61.08949416342412 1 10            12.027 1 2 2020
    
    11  81.76100628930817 1 10             8.463 1 2 2024
    
    12                 40 2 15               1.2 1 3 2018
    
    12  34.78260869565218 2 15             1.781 1 3 2020
    
    12 58.333333333333336 2 15             1.326 1 3 2022
    
    12 58.333333333333336 2 15             1.102 1 3 2024
    
    13 15.789473684210526 5 13             4.416 3 5 2014
    
    13 22.727272727272727 5 15              4.35 3 5 2016
    
    13  33.33333333333333 5 15             4.407 3 5 2018
    
    13 32.142857142857146 5 15             5.436 3 5 2020
    
    13                 25 5 15             4.593 3 5 2022
    
    13 30.864197530864196 5 15              4.68 3 5 2024
    
    14  79.32850559578671 1 13             12.17 1 2 2014
    
    14              81.25 1 13             8.247 1 2 2016
    
    14  45.23433385992628 1 16             8.322 1 2 2018
    
    14  78.84615384615384 1 16             8.365 1 2 2022
    
    14  79.98999499749875 1 15             7.529 1 2 2024
    
    15             35.625 4 14             5.902 3 4 2014
    
    15 31.914893617021278 4 15             5.844 3 4 2016
    
    15 30.645161290322577 4 15             4.763 3 4 2018
    
    15  25.71428571428572 4 15             4.049 3 4 2020
    
    15 23.958333333333332 4 15             3.574 3 4 2022
    
    15  47.26027397260275 4 15             3.361 3 4 2024
    
    16  80.82901554404145 3 14             8.523 1 4 2014
    
    16  81.64556962025317 3 15              7.83 1 4 2016
    
    16  83.33333333333334 3 15             5.941 1 4 2018
    
    16  85.29411764705883 3 15             5.545 1 4 2020
    
    16               72.5 3 15              5.57 1 4 2022
    
    16  65.21739130434783 3 15             5.488 1 4 2024
    
    17  41.66666666666667 1 10                 7 3 2 2016
    
    17                 40 1 10             7.896 3 2 2018
    
    17                 50 1 10            10.784 3 2 2020
    
    17 50.391644908616186 1 10             8.763 3 2 2022
    
    17  55.55555555555556 1 10                 7 3 2 2024
    
    18                 20 2 15             1.784 3 1 2016
    
    18               22.5 2 15              1.41 3 1 2018
    
    18 47.368421052631575 2 15             1.502 3 1 2020
    
    18                 50 2 17             1.722 3 1 2024
    
    19 35.714285714285715 2 16             2.021 3 2 2014
    
    19                 24 5 16             3.498 3 2 2016
    
    19                 40 4 14             3.519 3 2 2018
    
    19                 50 4 18             3.552 3 2 2022
    
    19  36.40776699029126 4 16             3.091 3 2 2024
    
    20  67.44186046511628 3 10            27.517 3 4 2014
    
    20 60.416666666666664 3 10            25.408 3 4 2016
    
    20  68.96551724137932 3 10              18.4 3 4 2018
    
    end
    
    label values TS_ce TS_ce_l
    
    label def TS_ce_l 1 "specific uniform", modify
    
    label def TS_ce_l 2 "advalorem uniform", modify
    
    label def TS_ce_l 3 "mixed uniform", modify
    
    label def TS_ce_l 4 "specific_tiered", modify
    
    label def TS_ce_l 5 "advalorem tiered", modify
    
    label def TS_ce_l 6 "mixed tiered", modify
    
    label values region_id region_id_l
    
    label def region_id_l 1 "AFR", modify
    
    label def region_id_l 2 "AMR", modify
    
    label def region_id_l 3 "EMR", modify
    
    label def region_id_l 4 "EUR", modify
    
    label def region_id_l 5 "SEA", modify
    
    label def region_id_l 6 "WPR", modify
    In principle, my research question can be answered by looking at variation in the tax structure within countries over time; or by allowing differences within and between countries to factor in. My literature search indicated the need for some time invariant predictors, so xtreg, cre seemed a sensible starting point. Below is the output. From the Mundlak test, I fail to reject the null that random effects are efficient. So this provides some support for going with xtreg, re. However, I’ve observed that most of the very experienced people on this forum don’t believe that hypothesis testing should be the sole basis for selecting one estimator over another. So, I thought it would sensible to report the results of the Mundlak test, and then report results from both the RE and CRE models.

    Code:
    . xtreg price_dispersion_use i.TS_ce POWE unem i.income i. region_id i.year, cre vce(cluster id)
    note: 2.income omitted from xt_means because of collinearity.
    note: 3.income omitted from xt_means because of collinearity.
    note: 2.region_id omitted from xt_means because of collinearity.
    note: 3.region_id omitted from xt_means because of collinearity.
    note: 4.region_id omitted from xt_means because of collinearity.
    note: 5.region_id omitted from xt_means because of collinearity.
    note: 6.region_id omitted from xt_means because of collinearity.
    note: 2014b.year omitted from xt_means because of collinearity.
    
    Correlated random-effects regression            Number of obs     =        910
    Group variable: id                              Number of groups  =        180
    
    R-squared:                                      Obs per group:
         Within  = 0.0846                                         min =          1
         Between = 0.6160                                         avg =        5.1
         Overall = 0.4941                                         max =          6
    
                                                    Wald chi2(19)     =     174.94
    corr(xit_vars*b, xt_means*γ) = -0.0234          Prob > chi2       =     0.0000
    
                                             (Std. err. adjusted for 180 clusters in id)
    ------------------------------------------------------------------------------------
                       |               Robust
    price_dispersion~e | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------------+----------------------------------------------------------------
    xit_vars           |
                 TS_ce |
    advalorem uniform  |   -7.00536   5.691736    -1.23   0.218    -18.16096    4.150238
        mixed uniform  |   6.233715   5.841014     1.07   0.286    -5.214461    17.68189
      specific_tiered  |  -9.882044   4.106249    -2.41   0.016    -17.93015   -1.833944
     advalorem tiered  |  -9.838445   6.437943    -1.53   0.126    -22.45658    2.779692
         mixed tiered  |  -4.556287    6.71061    -0.68   0.497    -17.70884    8.596268
                       |
                  POWE |   .3949454   .6024939     0.66   0.512    -.7859209    1.575812
                  unem |  -.5789714   .3027195    -1.91   0.056    -1.172291     .014348
                       |
                income |
                    2  |  -21.24649   4.182089    -5.08   0.000    -29.44324   -13.04975
                    3  |  -14.13742   2.842535    -4.97   0.000    -19.70869   -8.566158
                       |
             region_id |
                  AMR  |   5.557842   4.096317     1.36   0.175    -2.470792    13.58648
                  EMR  |   -1.54277   4.222431    -0.37   0.715    -9.818583    6.733043
                  EUR  |    10.3946   4.720081     2.20   0.028     1.143407    19.64579
                  SEA  |  -5.420182   6.495625    -0.83   0.404    -18.15137     7.31101
                  WPR  |   5.069165   5.071582     1.00   0.318    -4.870953    15.00928
                       |
                  year |
                 2016  |   1.026464    1.19546     0.86   0.391    -1.316595    3.369524
                 2018  |   1.466876   1.592039     0.92   0.357    -1.653463    4.587215
                 2020  |   2.612579   1.628073     1.60   0.109    -.5783851    5.803542
                 2022  |   2.105276   1.735296     1.21   0.225    -1.295843    5.506394
                 2024  |   3.114156   1.929465     1.61   0.107    -.6675257    6.895838
                       |
                 _cons |   61.47376   13.28127     4.63   0.000     35.44295    87.50458
    -------------------+----------------------------------------------------------------
    xt_means           |
                 TS_ce |
    advalorem uniform  |  -8.170804   6.891239    -1.19   0.236    -21.67738    5.335775
        mixed uniform  |  -9.508535    6.53317    -1.46   0.146    -22.31331    3.296242
      specific_tiered  |  -2.998356    6.78168    -0.44   0.658     -16.2902    10.29349
     advalorem tiered  |  -7.560736   10.26701    -0.74   0.461     -27.6837    12.56222
         mixed tiered  |  -26.60391   10.31528    -2.58   0.010    -46.82148   -6.386337
                       |
                  POWE |   .0419637   .7152601     0.06   0.953     -1.35992    1.443848
                  unem |   .5155043   .3608912     1.43   0.153    -.1918295    1.222838
                       |
                income |
                    2  |          0  (omitted)
                    3  |          0  (omitted)
                       |
             region_id |
                  AMR  |          0  (omitted)
                  EMR  |          0  (omitted)
                  EUR  |          0  (omitted)
                  SEA  |          0  (omitted)
                  WPR  |          0  (omitted)
                       |
                  year |
                 2016  |   3.785794   15.98809     0.24   0.813    -27.55028    35.12187
                 2018  |   12.67214   17.29928     0.73   0.464    -21.23382    46.57811
                 2020  |  -14.10317   15.83415    -0.89   0.373    -45.13754     16.9312
                 2022  |  -3.180658   13.25776    -0.24   0.810    -29.16539    22.80407
                 2024  |  -5.024841   13.70644    -0.37   0.714    -31.88897    21.83929
    -------------------+----------------------------------------------------------------
               sigma_u |  12.287152
               sigma_e |  11.679675
                   rho |  .52533028   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------
    Mundlak test (xt_means = 0): chi2(12) = 13.1329           Prob > chi2 = 0.3595
    
    . estat mundlak
    
    Mundlak specification test
    H0: Covariates are uncorrelated with unobserved panel-level effects
    
       chi2(12) =  13.13
    Prob > chi2 = 0.3595
    
    Notes: Fixed effects and correlated random effects are
           consistent under H0 and Ha.
           Random effects are efficient under H0.

    However, on my understanding that the xt_means shown in the CRE output show the “between effects”; I am not sure how what to make of these results for two reasons. First, at a descriptive level, variation between countries drives variation in tax structure (TS_ce) to a much greater extent than variation within countries over time (please see xtsum output below); so I am surprised to see that most of the xt_means for TS_ce are not statistically different from zero.




    Code:
    
    . xtsum TS_ce
    
    
    
    
    Variable         |      Mean   Std. dev.       Min        Max |    Observations
    
    -----------------+--------------------------------------------+----------------
    
    TS_ce    overall |  2.584615   1.316304          1          6 |     N =     910
    
             between |             1.134847          1          6 |     n =     180
    
             within  |             .6594633  -.4153846   6.251282 | T-bar = 5.05556


    Second, I am finding it very hard to reconcile these CRE results with my RE estimates (shown below). While I can fully appreciate that “xtreg, re” is a different estimation procedure; I am left stuck on how to interpret my CRE model output in light of the RE estimates. The RE estimates are telling me a story that makes sense. All tax structures other than a uniform specific tax (the base of TS_ce) decrease my measure of price dispersion (and a reduction in this % indicates a larger gap between the most expensive and cheapest brand). My understanding of what the CRE model is telling me, by contrast, is that when I control for unobserved time-invariant country-level factors; the between effect (xtmeans) is only statistically different from zero for countries that adopt a mixed tiered structure. Is this simply evidence that my RE results aren't robust to a CRE estimation? Or is the estimation of the CRE model simply not a smart way to try and model the relationship.


    Code:
    
    . xtreg price_dispersion_use i.TS_ce POWE unem i.income i.region_id i.year, re vce(cluster id)
    
    
    
    
    Random-effects GLS regression                   Number of obs     =        910
    
    Group variable: id                              Number of groups  =        180
    
    
    
    
    R-squared:                                      Obs per group:
    
         Within  = 0.0765                                         min =          1
    
         Between = 0.5851                                         avg =        5.1
    
         Overall = 0.4752                                         max =          6
    
    
    
    
                                                    Wald chi2(19)     =     474.68
    
    corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
    
    
    
    
                                             (Std. err. adjusted for 180 clusters in id)
    
    ------------------------------------------------------------------------------------
    
                       |               Robust
    
    price_dispersion~e | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    
    -------------------+----------------------------------------------------------------
    
                 TS_ce |
    
    advalorem uniform  |  -12.68268   3.205268    -3.96   0.000    -18.96489   -6.400475
    
        mixed uniform  |  -.1250515   3.034091    -0.04   0.967     -6.07176    5.821657
    
      specific_tiered  |   -12.0051   3.283801    -3.66   0.000    -18.44123   -5.568966
    
     advalorem tiered  |  -14.78059   4.070479    -3.63   0.000    -22.75859     -6.8026
    
         mixed tiered  |  -12.34087   4.762831    -2.59   0.010    -21.67585   -3.005894
    
                       |
    
                  POWE |   .3580088    .346207     1.03   0.301    -.3205445    1.036562
    
                  unem |  -.2119297   .1624692    -1.30   0.192    -.5303634     .106504
    
                       |
    
                income |
    
                    2  |  -21.74245   3.636952    -5.98   0.000    -28.87075   -14.61416
    
                    3  |  -15.02823   2.638187    -5.70   0.000    -20.19898   -9.857476
    
                       |
    
             region_id |
    
                  AMR  |   7.313431   3.643355     2.01   0.045     .1725851    14.45428
    
                  EMR  |  -3.950831   4.557214    -0.87   0.386    -12.88281    4.981144
    
                  EUR  |   9.989994   4.205076     2.38   0.018     1.748197    18.23179
    
                  SEA  |    -6.8663   5.576326    -1.23   0.218     -17.7957    4.063098
    
                  WPR  |   6.262471   5.043423     1.24   0.214    -3.622456     16.1474
    
                       |
    
                  year |
    
                 2016  |   1.125533   1.138146     0.99   0.323    -1.105191    3.356258
    
                 2018  |    1.80515   1.446099     1.25   0.212    -1.029151    4.639451
    
                 2020  |   2.504381   1.458252     1.72   0.086    -.3537408    5.362502
    
                 2022  |   2.474173   1.494605     1.66   0.098    -.4551981    5.403544
    
                 2024  |   3.501714   1.726538     2.03   0.043     .1177607    6.885667
    
                       |
    
                 _cons |   60.35417   6.010714    10.04   0.000     48.57339    72.13495
    
    -------------------+----------------------------------------------------------------
    
               sigma_u |  12.287152
    
               sigma_e |  11.679675
    
                   rho |  .52533028   (fraction of variance due to u_i)
    
    ------------------------------------------------------------------------------------



    Thank you for taking the time to read this!




    Sam
    Last edited by Sam Murgatroyd; 12 Nov 2025, 04:41.

  • #2
    Dear Sam Murgatroyd,

    Comparing the CRE and RE results, my intuition tells me that there is a large multicollinearity between the xt_mean and xt variables.

    Some manifestations that support my intuition include:
    1. The coefficients of xt are highly statistically significant (by z-test) in RE, after adding xt_mean, the coefficients of both xt and xt_mean are statistically insignificant (by z-test).
    2. The predictive ability is improved after adding xt_mean to RE: especially the between and overall dimensions.
    3. The variation of TS_ce comes mainly from the cross-dimensional dimension, which probably makes its correlation with the corresponding time-averaged component in xt_mean high, increasing the degree of multicollinearity.
    If both TS_ce and price_dispersion_use vary mainly from the between dimension, the recommended choice is the between estimator (xtreg, be) (Cameron & Trivedi, 2022). This estimator also uses the assumption of exogeneity of X with composite error (u_i + e_it) like RE, but will be more accurate in the context of the variation of Y and X mainly from the between dimension.

    If the cause is indeed multicollinearity in CRE, another way is to use Ridge estimation. But to my knowledge, there is currently only Ridge estimation for RE models, with the xtregrem command, not for RE, so you will need to manually create xt_mean variables and add them to the Ridge-RE estimation.

    Hope it's helpful.
    Manh Hoang-Ba,
    Facebook,
    Eureka! Uni - YouTube,
    ManhHB94 (Manh Hoang Ba),
    Hoàng Bá Mạnh – Kinh tế lượng: Lý thuyết và ứng dụng

    Comment


    • #3
      Sam:
      what does the -xttest0- after -xtreg,re- tell you?
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Hello!

        Here is the output of xttest0. My understanding is that I reject the null; so RE is better than pooled OLS. Is this correct?

        Code:
        . xtreg price_dispersion_use i.TS_ce POWE unem i.income i.region_id i.year, re vce(cluster id)
        
        Random-effects GLS regression                   Number of obs     =        910
        Group variable: id                              Number of groups  =        180
        
        R-squared:                                      Obs per group:
             Within  = 0.0765                                         min =          1
             Between = 0.5851                                         avg =        5.1
             Overall = 0.4752                                         max =          6
        
                                                        Wald chi2(19)     =     474.68
        corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
        
                                                    (Std. err. adjusted for 180 clusters in id)
        ---------------------------------------------------------------------------------------
                              |               Robust
         price_dispersion_use | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
        ----------------------+----------------------------------------------------------------
                        TS_ce |
        2. advalorem uniform  |  -12.68268   3.205268    -3.96   0.000    -18.96489   -6.400475
            3. mixed uniform  |  -.1250515   3.034091    -0.04   0.967     -6.07176    5.821657
          4. specific_tiered  |   -12.0051   3.283801    -3.66   0.000    -18.44123   -5.568966
         5. advalorem tiered  |  -14.78059   4.070479    -3.63   0.000    -22.75859     -6.8026
             6. mixed tiered  |  -12.34087   4.762831    -2.59   0.010    -21.67585   -3.005894
                              |
                         POWE |   .3580088    .346207     1.03   0.301    -.3205445    1.036562
                         unem |  -.2119297   .1624692    -1.30   0.192    -.5303634     .106504
                              |
                       income |
                           2  |  -21.74245   3.636952    -5.98   0.000    -28.87075   -14.61416
                           3  |  -15.02823   2.638187    -5.70   0.000    -20.19898   -9.857476
                              |
                    region_id |
                      2. AMR  |   7.313431   3.643355     2.01   0.045     .1725851    14.45428
                      3. EMR  |  -3.950831   4.557214    -0.87   0.386    -12.88281    4.981144
                      4. EUR  |   9.989994   4.205076     2.38   0.018     1.748197    18.23179
                      5. SEA  |    -6.8663   5.576326    -1.23   0.218     -17.7957    4.063098
                      6. WPR  |   6.262471   5.043423     1.24   0.214    -3.622456     16.1474
                              |
                         year |
                        2016  |   1.125533   1.138146     0.99   0.323    -1.105191    3.356258
                        2018  |    1.80515   1.446099     1.25   0.212    -1.029151    4.639451
                        2020  |   2.504381   1.458252     1.72   0.086    -.3537408    5.362502
                        2022  |   2.474173   1.494605     1.66   0.098    -.4551981    5.403544
                        2024  |   3.501714   1.726538     2.03   0.043     .1177607    6.885667
                              |
                        _cons |   60.35417   6.010714    10.04   0.000     48.57339    72.13495
        ----------------------+----------------------------------------------------------------
                      sigma_u |  12.287152
                      sigma_e |  11.679675
                          rho |  .52533028   (fraction of variance due to u_i)
        ---------------------------------------------------------------------------------------
        
        . xttest0
        
        Breusch and Pagan Lagrangian multiplier test for random effects
        
                price_dispersion_use[id,t] = Xb + u[id] + e[id,t]
        
                Estimated results:
                                 |       Var     SD = sqrt(Var)
                        ---------+-----------------------------
                       price_d~e |   541.6231        23.2728
                               e |   136.4148       11.67968
                               u |   150.9741       12.28715
        
                Test: Var(u) = 0
                                     chibar2(01) =   524.67
                                  Prob > chibar2 =   0.0000
        
        . 
        end of do-file

        Is this sufficient evidence that RE is the way to go? I am generally nervous about RE because the uncorrelatedness assumption is a strong one, and I am using observational data. In my context, is CRE a sensible option to add (in addition to RE) and, if so, I am still lost on the interpretation of the xt_means, and would appreciate help in understanding what the results are telling me. If CRE is not sensible, is there a better sensitivity analysis to conduct than CRE? I've seen mixed effects used in my research context, but researchers have only used a two-level random intercept model, which produces very close results to the RE estimator, with slight differences stemming from the use of weighted GLS vs MLE.

        Thank you!

        Sam



        Comment


        • #5
          Sam:
          yes, you're right.
          In addition, the Rsq between is quite good.
          I would go RE, then.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Originally posted by Sam Murgatroyd View Post
            I am generally nervous about RE because the uncorrelatedness assumption is a strong one, and I am using observational data. In my context, is CRE a sensible option to add (in addition to RE) and, if so, I am still lost on the interpretation of the xt_means, and would appreciate help in understanding what the results are telling me. If CRE is not sensible, is there a better sensitivity analysis to conduct than CRE?
            You should review the discussion towards the end of this link to understand the logic behind specification tests such as the Hausman test and the Mundlak (CRE) specification test.

            Both the FE estimator and the CRE estimator remain appropriate even if the random-effects assumption holds. The RE estimator is merely more efficient when that assumption is valid. Therefore, you do not need to justify the use of FE or CRE in the first place—they are consistent regardless. The specification tests are mainly useful for defending the use of the RE estimator.

            The CRE specification reproduces the FE estimates for the time-varying regressors. The Hausman test works by comparing the FE and RE estimates to see whether they differ substantially. If they do, the RE estimator is inconsistent. Therefore, if you fail to reject the RE assumption, the implication is that the FE and RE estimates are not meaningfully different. In that case, what you gain from using RE is efficiency, along with the ability to obtain coefficients on time-invariant variables.

            I would therefore recommend setting aside specification tests and using CRE. The logic behind this recommendation is nicely summarized in the following description of CRE from https://www.stata.com/new-in-stata/c...effects-model/ :


            An FE model will omit any variable that remains constant across time and thus cannot fully answer our research question. An RE model may yield inconsistent estimates because of the possible correlation between individual time-invariant heterogeneity and the regressors age and tenure.

            We can use a CRE model to circumvent both problems.
            Last edited by Andrew Musau; 16 Nov 2025, 05:29.

            Comment


            • #7
              Following up on Andrew's helpful comments: on the variables that you should care about -- those that change over time -- the FE and CRE estimates are identical. CRE has two advantages over FE. One is that you can obtain coefficients on time-constant variables. But these care rarely be interpreted as causal, and so it works as a plausibility check. The second is that you can obtain a robust, regression-based version of a Hausman test. This is a distinct advantage over the traditional Hausman test, which is not robust and often gets the degrees-of-freedom wrong.

              We have to be careful in preferring an estimation method just because it accords with our expectations. I might think a job training program, implemented over time, has a positive effect on labor market earnings. But if there is selection into the program, I shouldn't trust the RE estimates just because they show a positive effect. The FE/CRE estimates will be more reliable because they allow (some) selection into treatment. And, of course, they are still valid if the explanatory variables -- such as a treatment indicator -- are correlated with the unobserved effect. There are good reasons why FE/CRE is the standard in empirical research. One might argue for RE, but it's often an act of desperation.

              In your case, the Hausman p-value is about 0.36, and you might use that to argue in favor of RE. But that includes the time averages of the five year dummies, and those only appear because you have an unbalanced panel.

              Comment

              Working...
              X