Announcement

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

  • Why different FE and RE results for the same model ? One uses eststo

    Hi All,

    I'm using STATA 15.

    My problem is that I see different results when I run the same random-intercept only mixed effects model, but where I run one (i) using the "eststo", prefix and the other (ii) without any prefix, ie "mixed absenty_p bmim || grade: " only. My code is below. Please let me know if I can clarify, thank you so much

    Q: Would someone have an idea why the models report different fixed-effects and random-effects results?


    Code:
    . mixed absenty_p bmim || grade:
    
    Performing EM optimization: 
    
    Performing gradient-based optimization: 
    
    Iteration 0:   log likelihood =  3895.8906  
    Iteration 1:   log likelihood =  3895.8906  
    
    Computing standard errors:
    
    Mixed-effects ML regression                     Number of obs     =      2,676
    Group variable: grade                           Number of groups  =          9
    
                                                    Obs per group:
                                                                  min =        225
                                                                  avg =      297.3
                                                                  max =        343
    
                                                    Wald chi2(1)      =       0.08
    Log likelihood =  3895.8906                     Prob > chi2       =     0.7762
    
    ------------------------------------------------------------------------------
       absenty_p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            bmim |   .0000584   .0002054     0.28   0.776    -.0003441    .0004609
           _cons |   .0564974   .0050627    11.16   0.000     .0465748    .0664201
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    grade: Identity              |
                      var(_cons) |   .0000597   .0000336      .0000198      .00018
    -----------------------------+------------------------------------------------
                   var(Residual) |   .0031639   .0000866      .0029986    .0033384
    ------------------------------------------------------------------------------
    LR test vs. linear model: chibar2(01) = 29.82         Prob >= chibar2 = 0.0000
    
    . predict randint0, reffects
    (570 missing values generated)
    
    . graph hbar (mean) randint0, over(grade) ytitle("Random Intercepts by Grade")
    
    . eststo: mixed absenty_p bmim || grade: 
    
    Performing EM optimization: 
    
    Performing gradient-based optimization: 
    
    Iteration 0:   log restricted-likelihood =    3883.39  
    Iteration 1:   log restricted-likelihood =    3883.39  
    
    Computing standard errors:
    
    Mixed-effects REML regression                   Number of obs     =      2,676
    Group variable: grade                           Number of groups  =          9
    
                                                    Obs per group:
                                                                  min =        225
                                                                  avg =      297.3
                                                                  max =        343
    
                                                    Wald chi2(1)      =       0.11
    Log restricted-likelihood =    3883.39          Prob > chi2       =     0.7432
    
    ------------------------------------------------------------------------------
       absenty_p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            bmim |   .0000674   .0002057     0.33   0.743    -.0003357    .0004705
           _cons |   .0563113   .0051681    10.90   0.000      .046182    .0664406
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    grade: Identity              |
                      var(_cons) |   .0000689   .0000403      .0000219    .0002167
    -----------------------------+------------------------------------------------
                   var(Residual) |   .0031651   .0000867      .0029996    .0033396
    ------------------------------------------------------------------------------
    LR test vs. linear model: chibar2(01) = 31.86         Prob >= chibar2 = 0.0000
    (est5 stored)

  • #2
    You didn't get a quick answer. You'll increase your likelihood of a useful answer by following the FAQ on asking questions - Stata code in code delimiters, readable Stata output, and sample data using dataex.. We can't replicate your problem which makes it hard for folks to do much.

    It is not a general problem - I tried a parallel estimate and got precisely the same results with and without eststo: . Have you tried running one right after the other? .What happens if you reverse the order of the estimations?

    If all else fails, ask Stata technical support. They're very helpful.

    Comment


    • #3
      In one case you have maximum likelihood

      Mixed-effects ML regression
      whereas in the other case you have restricted maximum likelihood

      Code:
      Mixed-effects REML regression
      Does it help if you explicitly specify maximum likelihood in the second regression?

      Code:
      eststo: mixed absenty_p bmim || grade:, mle

      Comment

      Working...
      X