Announcement

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

  • Different outcomes from (xt)mixed using the same code in stata11 or stata13

    Hello everyone,

    I have different versions of Stata that I am working with, and I found out that I get different outcomes from my multilevel model when estimating it in Stata11 or Stata13. The coefficients, standard errors and the estimated random and fixed variances, nothing is the same. What is also strange is that in Stata13, the estimated constant/fixed part of the variance is very close to zero in most models that I estimate, whereas in Stata11 that is not the case. I am inclined to think that the numbers in Stata11 are correct then, but I find it puzzling why they differ. I checked the code and the descriptives, these are all the same. I don't have the problem with my OLS models.
    In Stata13 I tried xtmixed and mixed but that makes no difference.

    Does anyone recognize this?

    Thank you,
    Best regards, Krista

  • #2
    It would be useful to show us what difference you have found. Please use the Advanced editor button (right side) to insert your Stata codes for both versions you have used along with the outputs. Also, please do consider registering with your first and last name. That is the etiquette of this forum. Just hit the 'contac us' tab at the bottom right hand corner and request to change your name.
    Roman

    Comment


    • #3
      Stata11: xtmixed gdpgrowthlong loggdp91 avinvest schoolav avpopg rdtot div share1834 neighborgrowth || country:, var


      PHP Code:
                                                                                                              Mixed-effects REML regression Number of obs 90                                                                   Group variablecountry Number of groups 14                                                                   Obs per groupmin 1                                                                   avg 6.4                                                                   max 14                                                                                                                                       Wald chi2(9) = 38.34                                                                   Log restricted-likelihood = -90.489576 Prob chi2 0.0000 
      LogGDP91 .0125548 .1370401 0.09 0.927 -.2560389 .2811484
      11.81467 2.905393 4.07 0.000 6.120208
      17.50914
      -.0172865 .0523465 -0.33 0.741 -.1198838 .0853108
      etc.
      estimate std. err. 95% conf. interval
      .2745829 .2627296 .0420937 1.791142
      .400728 .0777151 .2740135 .5860401
      LR test vs. linear regression: chibar2(01) = 3.19 Prob >= chibar2 = 0.0370
      .
      Stata13:
      PHP Code:
                                  Mixed-effects ML regression Number of obs 90                               Group variablecountry Number of groups 14                               Obs per groupmin 1                               avg 6.4                               max 14                                                               Wald chi2(9) = 44.72                               Log likelihood = -91.620449 Prob chi2 0.0000 
      -.0871432 .1096413 -0.79 0.427 -.3020362 .1277499
      4.658472 1.874031 2.49 0.013 .9854388 8.331506
      -.0312137 .0503339 -0.62 0.535 -.1298662 .0674389
      etc.
      estimate st. err. 95% CONF. Interval
      6.09e-24 7 7.40e-23 2.74e-34 1.35e-13
      .4484908 .0668608 .3348551 .6006897
      LR test vs. linear regression: chibar2(01) = 0.00 Prob >= chibar2 = 1.0000

      Comment


      • #4
        Ok apparently I did something wrong.. the first row and column of the tables totally disappeared.
        How do you guys normally paste tables/output from Stata inhere?

        Comment


        • #5
          Krista (as per FAQ#6, please note the strong preference on this forrum for real full names. Just click on the Contact us button bottom right of the screen to re-register. Thanks):
          the best way to post what you typed and what Stata gave you back is via the code delimiters function (# icon) available among the advanced editor (A icon top right of the reply section) capabilities.
          You can paste all the items of your Stata session on a .do file, copy everything and then pasting it all in between the code delimiters.
          In the meantime, what sounds strange in the partial Stata output you posted, is that the LRtest at the foot of the tables is statistically significant under Stata 11 but no more so under Stata 13.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            What it comes down to is that in Stata13, the constant variance goes to zero so the coefficients are the same as when I estimate that same model in OLS (the standard errors are different due to maximum likelihood optimization). In Stata11 the constant variance is significantly different from zero and the multilevel model is preferred to the linear model.

            Comment


            • #7
              Krista:
              thanks for further details.
              However, is difficult to advice without seeing both code and output.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                From the output, at least one difference between the two outputs can be deciphered:

                In version 11, the model is estimated via Restricted maximum likelihood

                Code:
                Logrestricted-likelihood = -90.489576 Prob > chi2 = 0.0000 Wald chi2(9) = 38.34
                In version 13, the model is estimated via Maximum likelihood

                Code:
                 Log likelihood = -91.620449 Prob > chi2 = 0.0000 Wald chi2(9) 44.72
                Thus, the variation in the likelihood estimation and Wald. We yet need to see the original commands used in the both versions.
                Roman

                Comment


                • #9

                  Originally posted by Carlo Lazzaro View Post
                  Krista (as per FAQ#6, please note the strong preference on this forrum for real full names. Just click on the Contact us button bottom right of the screen to re-register. Thanks):
                  the best way to post what you typed and what Stata gave you back is via the code delimiters function (# icon) available among the advanced editor (A icon top right of the reply section) capabilities.
                  You can paste all the items of your Stata session on a .do file, copy everything and then pasting it all in between the code delimiters.
                  In the meantime, what sounds strange in the partial Stata output you posted, is that the LRtest at the foot of the tables is statistically significant under Stata 11 but no more so under Stata 13.

                  I already put in a request to change my name, thank you.

                  The difference in the LR test I think is fully due to the fact that the constant variance (so variance at the ''group level") is estimated at zero in Stata13, which would mean that there is no use for a multilevel model.
                  Last edited by Krista Bruns; 08 Dec 2014, 03:36.

                  Comment


                  • #10
                    Krista:
                    yes, I explained myself in the same way the LR result obtained with Stata 13 (that's why I've found it weird when contrasted against Stata 11 output).
                    Others thing being equal, the difference may be due to the different methods that were applied to the models (ML and REML), as Roman pointed out.
                    As an acid test, I would re-run both models with ML and REML in turn, to see if this is the cause of such differences. However, had this be the case, It would not solve in itself the issue concerning which methods is better (ML o REML) for your research.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Code:
                      ** Here I perform my multilevel regression in Stata11
                      
                      xtmixed gdpgrowthlong loggdp91  avinvest schoolav avpopg rdtot div share1834 neighborgrowth teahijob || country:, var
                      
                      Performing EM optimization: 
                      
                      Performing gradient-based optimization: 
                      
                      Iteration 0:   log likelihood = -91.974747  
                      Iteration 1:   log likelihood = -91.620479  
                      Iteration 2:   log likelihood = -91.620449  
                      Iteration 3:   log likelihood = -91.620449  
                      
                      Computing standard errors:
                      
                      Mixed-effects ML regression                     Number of obs      =        90
                      Group variable: country                         Number of groups   =        14
                      
                                                                      Obs per group: min =         1
                                                                                     avg =       6.4
                                                                                     max =        14
                      
                      
                                                                      Wald chi2(9)       =     44.72
                      Log likelihood = -91.620449                     Prob > chi2        =    0.0000
                      
                      --------------------------------------------------------------------------------
                       gdpgrowthlong |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      ---------------+----------------------------------------------------------------
                            loggdp91 |  -.0871432   .1096413    -0.79   0.427    -.3020362    .1277499
                            avinvest |   4.658472   1.874031     2.49   0.013     .9854388    8.331506
                            schoolav |  -.0312137   .0503339    -0.62   0.535    -.1298662    .0674389
                              avpopg |   .5820846   .1945965     2.99   0.003     .2006824    .9634867
                               rdtot |   .0279259   .0702177     0.40   0.691    -.1096984    .1655501
                                 div |   2.257493   2.215865     1.02   0.308    -2.085524    6.600509
                           share1834 |  -2.879823    2.56488    -1.12   0.262    -7.906895    2.147249
                      neighborgrowth |   .5176568   .1370554     3.78   0.000     .2490331    .7862806
                            teahijob |   21.78613     19.957     1.09   0.275    -17.32888    60.90113
                               _cons |   1.652741   1.777149     0.93   0.352    -1.830408    5.135889
                      --------------------------------------------------------------------------------
                      
                      ------------------------------------------------------------------------------
                        Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                      -----------------------------+------------------------------------------------
                      country: Identity            |
                                        var(_cons) |   6.09e-24   7.40e-23      2.74e-34    1.35e-13
                      -----------------------------+------------------------------------------------
                                     var(Residual) |   .4484908   .0668608      .3348551    .6006897
                      ------------------------------------------------------------------------------
                      LR test vs. linear regression: chibar2(01) =     0.00 Prob >= chibar2 = 1.0000
                      
                      . 
                      end of do-file
                      
                      **Here I perform the same regression in Stata13 
                      
                      . xtmixed gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob || country:, mle variance nostderr
                      
                      Performing EM optimization: 
                      
                      Performing gradient-based optimization: 
                      
                      Iteration 0:   log likelihood = -91.974747  
                      Iteration 1:   log likelihood = -91.620475  
                      Iteration 2:   log likelihood = -91.620449  
                      Iteration 3:   log likelihood = -91.620449  
                      
                      Mixed-effects ML regression                     Number of obs      =        90
                      Group variable: country                         Number of groups   =        14
                      
                                                                      Obs per group: min =         1
                                                                                     avg =       6.4
                                                                                     max =        14
                      
                      
                                                                      Wald chi2(9)       =     44.72
                      Log likelihood = -91.620449                     Prob > chi2        =    0.0000
                      
                      ------------------------------------------------------------------------------
                      gdpgrowthl~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                          loggdp91 |  -.0871432   .1096413    -0.79   0.427    -.3020362    .1277499
                          avinvest |   4.658472   1.874031     2.49   0.013     .9854388    8.331506
                            avpopg |   .5820846   .1945965     2.99   0.003     .2006824    .9634867
                          schoolav |  -.0312137   .0503339    -0.62   0.535    -.1298662    .0674389
                             rdtot |   .0279259   .0702177     0.40   0.691    -.1096984    .1655501
                               div |   2.257493   2.215865     1.02   0.308    -2.085524    6.600509
                         share1834 |  -2.879823    2.56488    -1.12   0.262    -7.906895    2.147249
                      neighborgr~h |   .5176568   .1370554     3.78   0.000     .2490331    .7862806
                          teahijob |   21.78613     19.957     1.09   0.275    -17.32888    60.90113
                             _cons |   1.652741   1.777149     0.93   0.352    -1.830408    5.135889
                      ------------------------------------------------------------------------------
                      
                      ------------------------------------------------------------------------------
                        Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                      -----------------------------+------------------------------------------------
                      country: Identity            |
                                        var(_cons) |   1.34e-23          .             .           .
                      -----------------------------+------------------------------------------------
                                     var(Residual) |   .4484908          .             .           .
                      ------------------------------------------------------------------------------
                      LR test vs. linear regression: chibar2(01) =     0.00 Prob >= chibar2 = 1.0000
                      
                      ** Here I perform the same regression in an OLS, to show that the ML model in Stata13 boils down to an OLS (multilevel is rejected due to the low/zero constant variance). The results from an OLS estimation are the same in both versions. 
                      . reg gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob
                      
                            Source |       SS       df       MS              Number of obs =      90
                      -------------+------------------------------           F(  9,    80) =    4.42
                             Model |  20.0582298     9   2.2286922           Prob > F      =  0.0001
                          Residual |  40.3641729    80  .504552161           R-squared     =  0.3320
                      -------------+------------------------------           Adj R-squared =  0.2568
                             Total |  60.4224027    89  .678903401           Root MSE      =  .71032
                      
                      --------------------------------------------------------------------------------
                       gdpgrowthlong |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      ---------------+----------------------------------------------------------------
                            loggdp91 |  -.0871432   .1162922    -0.75   0.456     -.318572    .1442857
                            avinvest |   4.658472    1.98771     2.34   0.022      .702803    8.614141
                              avpopg |   .5820846   .2064008     2.82   0.006     .1713339    .9928352
                            schoolav |  -.0312137   .0533871    -0.58   0.560    -.1374574    .0750301
                               rdtot |   .0279259   .0744772     0.37   0.709    -.1202884    .1761401
                                 div |   2.257493    2.35028     0.96   0.340    -2.419714    6.934699
                           share1834 |  -2.879823   2.720466    -1.06   0.293    -8.293723    2.534077
                      neighborgrowth |   .5176568   .1453692     3.56   0.001     .2283628    .8069509
                            teahijob |   21.78613    21.1676     1.03   0.306    -20.33873    63.91099
                               _cons |   1.652741   1.884951     0.88   0.383    -2.098432    5.403913
                      --------------------------------------------------------------------------------
                      
                      
                      ** Here I perform my multilevel regression in Stata11
                      
                      xtmixed gdpgrowthlong loggdp91  avinvest schoolav avpopg rdtot div share1834 neighborgrowth teahijob || country:, var
                      
                      Performing EM optimization: 
                      
                      Performing gradient-based optimization: 
                      
                      Iteration 0:   log likelihood = -91.974747  
                      Iteration 1:   log likelihood = -91.620479  
                      Iteration 2:   log likelihood = -91.620449  
                      Iteration 3:   log likelihood = -91.620449  
                      
                      Computing standard errors:
                      
                      Mixed-effects ML regression                     Number of obs      =        90
                      Group variable: country                         Number of groups   =        14
                      
                                                                      Obs per group: min =         1
                                                                                     avg =       6.4
                                                                                     max =        14
                      
                      
                                                                      Wald chi2(9)       =     44.72
                      Log likelihood = -91.620449                     Prob > chi2        =    0.0000
                      
                      --------------------------------------------------------------------------------
                       gdpgrowthlong |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      ---------------+----------------------------------------------------------------
                            loggdp91 |  -.0871432   .1096413    -0.79   0.427    -.3020362    .1277499
                            avinvest |   4.658472   1.874031     2.49   0.013     .9854388    8.331506
                            schoolav |  -.0312137   .0503339    -0.62   0.535    -.1298662    .0674389
                              avpopg |   .5820846   .1945965     2.99   0.003     .2006824    .9634867
                               rdtot |   .0279259   .0702177     0.40   0.691    -.1096984    .1655501
                                 div |   2.257493   2.215865     1.02   0.308    -2.085524    6.600509
                           share1834 |  -2.879823    2.56488    -1.12   0.262    -7.906895    2.147249
                      neighborgrowth |   .5176568   .1370554     3.78   0.000     .2490331    .7862806
                            teahijob |   21.78613     19.957     1.09   0.275    -17.32888    60.90113
                               _cons |   1.652741   1.777149     0.93   0.352    -1.830408    5.135889
                      --------------------------------------------------------------------------------
                      
                      ------------------------------------------------------------------------------
                        Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                      -----------------------------+------------------------------------------------
                      country: Identity            |
                                        var(_cons) |   6.09e-24   7.40e-23      2.74e-34    1.35e-13
                      -----------------------------+------------------------------------------------
                                     var(Residual) |   .4484908   .0668608      .3348551    .6006897
                      ------------------------------------------------------------------------------
                      LR test vs. linear regression: chibar2(01) =     0.00 Prob >= chibar2 = 1.0000
                      
                      . 
                      end of do-file
                      
                      **Here I perform the same regression in Stata13 
                      
                      . xtmixed gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob || country:, mle variance nostderr
                      
                      Performing EM optimization: 
                      
                      Performing gradient-based optimization: 
                      
                      Iteration 0:   log likelihood = -91.974747  
                      Iteration 1:   log likelihood = -91.620475  
                      Iteration 2:   log likelihood = -91.620449  
                      Iteration 3:   log likelihood = -91.620449  
                      
                      Mixed-effects ML regression                     Number of obs      =        90
                      Group variable: country                         Number of groups   =        14
                      
                                                                      Obs per group: min =         1
                                                                                     avg =       6.4
                                                                                     max =        14
                      
                      
                                                                      Wald chi2(9)       =     44.72
                      Log likelihood = -91.620449                     Prob > chi2        =    0.0000
                      
                      ------------------------------------------------------------------------------
                      gdpgrowthl~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                          loggdp91 |  -.0871432   .1096413    -0.79   0.427    -.3020362    .1277499
                          avinvest |   4.658472   1.874031     2.49   0.013     .9854388    8.331506
                            avpopg |   .5820846   .1945965     2.99   0.003     .2006824    .9634867
                          schoolav |  -.0312137   .0503339    -0.62   0.535    -.1298662    .0674389
                             rdtot |   .0279259   .0702177     0.40   0.691    -.1096984    .1655501
                               div |   2.257493   2.215865     1.02   0.308    -2.085524    6.600509
                         share1834 |  -2.879823    2.56488    -1.12   0.262    -7.906895    2.147249
                      neighborgr~h |   .5176568   .1370554     3.78   0.000     .2490331    .7862806
                          teahijob |   21.78613     19.957     1.09   0.275    -17.32888    60.90113
                             _cons |   1.652741   1.777149     0.93   0.352    -1.830408    5.135889
                      ------------------------------------------------------------------------------
                      
                      ------------------------------------------------------------------------------
                        Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                      -----------------------------+------------------------------------------------
                      country: Identity            |
                                        var(_cons) |   1.34e-23          .             .           .
                      -----------------------------+------------------------------------------------
                                     var(Residual) |   .4484908          .             .           .
                      ------------------------------------------------------------------------------
                      LR test vs. linear regression: chibar2(01) =     0.00 Prob >= chibar2 = 1.0000
                      
                      ** Here I perform the same regression in an OLS, to show that the ML model in Stata13 boils down to an OLS (multilevel is rejected due to the low/zero constant variance). The results from an OLS estimation are the same in both versions. 
                      . reg gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob
                      
                            Source |       SS       df       MS              Number of obs =      90
                      -------------+------------------------------           F(  9,    80) =    4.42
                             Model |  20.0582298     9   2.2286922           Prob > F      =  0.0001
                          Residual |  40.3641729    80  .504552161           R-squared     =  0.3320
                      -------------+------------------------------           Adj R-squared =  0.2568
                             Total |  60.4224027    89  .678903401           Root MSE      =  .71032
                      
                      --------------------------------------------------------------------------------
                       gdpgrowthlong |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      ---------------+----------------------------------------------------------------
                            loggdp91 |  -.0871432   .1162922    -0.75   0.456     -.318572    .1442857
                            avinvest |   4.658472    1.98771     2.34   0.022      .702803    8.614141
                              avpopg |   .5820846   .2064008     2.82   0.006     .1713339    .9928352
                            schoolav |  -.0312137   .0533871    -0.58   0.560    -.1374574    .0750301
                               rdtot |   .0279259   .0744772     0.37   0.709    -.1202884    .1761401
                                 div |   2.257493    2.35028     0.96   0.340    -2.419714    6.934699
                           share1834 |  -2.879823   2.720466    -1.06   0.293    -8.293723    2.534077
                      neighborgrowth |   .5176568   .1453692     3.56   0.001     .2283628    .8069509
                            teahijob |   21.78613    21.1676     1.03   0.306    -20.33873    63.91099
                               _cons |   1.652741   1.884951     0.88   0.383    -2.098432    5.403913
                      --------------------------------------------------------------------------------

                      Comment


                      • #12
                        Krista:
                        another interesting result comes alive: under both Stata 11 and 13 (ML method) now the LR test does not reject the null and both mixed models boil down to an OLS.
                        This obviously do not answer the main question(why random-effect estimates are different?).
                        A further wild guess: were both Stata releases properly updated?
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Thank you Carlo, indeed it is strange that suddenly both versions reject the ML model. I updated both versions of Stata and now I am back to the previous results again: (still different for both models)

                          Code:
                          ** Stata11:
                          
                          
                          . xtmixed gdpgrowthlong loggdp91  avinvest schoolav avpopg rdtot div share1834 neighborgrowth teahijob || country:, var
                          
                          Performing EM optimization: 
                          
                          Performing gradient-based optimization: 
                          
                          Iteration 0:   log restricted-likelihood = -90.489843  
                          Iteration 1:   log restricted-likelihood = -90.489576  
                          Iteration 2:   log restricted-likelihood = -90.489576  
                          
                          Computing standard errors:
                          
                          Mixed-effects REML regression                   Number of obs      =        90
                          Group variable: country                         Number of groups   =        14
                          
                                                                          Obs per group: min =         1
                                                                                         avg =       6.4
                                                                                         max =        14
                          
                          
                                                                          Wald chi2(9)       =     38.34
                          Log restricted-likelihood = -90.489576          Prob > chi2        =    0.0000
                          
                          ------------------------------------------------------------------------------
                          gdpgrowthl~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                          -------------+----------------------------------------------------------------
                              loggdp91 |   .0125548   .1370401     0.09   0.927    -.2560389    .2811484
                              avinvest |   11.81467   2.905393     4.07   0.000     6.120208    17.50914
                              schoolav |  -.0172865   .0523465    -0.33   0.741    -.1198838    .0853108
                                avpopg |   .4918044   .2143475     2.29   0.022     .0716911    .9119177
                                 rdtot |   .0335398   .0755192     0.44   0.657    -.1144751    .1815547
                                   div |   2.077331   2.880859     0.72   0.471     -3.56905    7.723712
                             share1834 |  -1.103436   3.050067    -0.36   0.718    -7.081458    4.874586
                          neighborgr~h |    .313584   .1455326     2.15   0.031     .0283454    .5988225
                              teahijob |   16.00377    24.9704     0.64   0.522    -32.93732    64.94486
                                 _cons |  -1.078257   2.010241    -0.54   0.592    -5.018256    2.861743
                          ------------------------------------------------------------------------------
                          
                          ------------------------------------------------------------------------------
                            Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                          -----------------------------+------------------------------------------------
                          country: Identity            |
                                            var(_cons) |   .2745829   .2627296      .0420937    1.791142
                          -----------------------------+------------------------------------------------
                                         var(Residual) |    .400728   .0777151      .2740135    .5860401
                          ------------------------------------------------------------------------------
                          LR test vs. linear regression: chibar2(01) =     3.19 Prob >= chibar2 = 0.0370
                          
                          . estat ic
                          
                          -----------------------------------------------------------------------------
                                 Model |    Obs    ll(null)   ll(model)     df          AIC         BIC
                          -------------+---------------------------------------------------------------
                                     . |     90           .   -90.48958     12     204.9792    234.9769
                          -----------------------------------------------------------------------------
                                         Note:  N=Obs used in calculating BIC; see [R] BIC note
                          
                          
                          
                          
                          ** Stata13:
                          
                          . xtmixed gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob || country:, mle variance nostderr
                          
                          Performing EM optimization: 
                          
                          Performing gradient-based optimization: 
                          
                          Iteration 0:   log likelihood = -91.974747  
                          Iteration 1:   log likelihood = -91.620475  
                          Iteration 2:   log likelihood = -91.620449  
                          Iteration 3:   log likelihood = -91.620449  
                          
                          Mixed-effects ML regression                     Number of obs      =        90
                          Group variable: country                         Number of groups   =        14
                          
                                                                          Obs per group: min =         1
                                                                                         avg =       6.4
                                                                                         max =        14
                          
                          
                                                                          Wald chi2(9)       =     44.72
                          Log likelihood = -91.620449                     Prob > chi2        =    0.0000
                          
                          --------------------------------------------------------------------------------
                           gdpgrowthlong |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                          ---------------+----------------------------------------------------------------
                                loggdp91 |  -.0871432   .1096413    -0.79   0.427    -.3020362    .1277499
                                avinvest |   4.658472   1.874031     2.49   0.013     .9854388    8.331506
                                  avpopg |   .5820846   .1945965     2.99   0.003     .2006824    .9634867
                                schoolav |  -.0312137   .0503339    -0.62   0.535    -.1298662    .0674389
                                   rdtot |   .0279259   .0702177     0.40   0.691    -.1096984    .1655501
                                     div |   2.257493   2.215865     1.02   0.308    -2.085524    6.600509
                               share1834 |  -2.879823    2.56488    -1.12   0.262    -7.906895    2.147249
                          neighborgrowth |   .5176568   .1370554     3.78   0.000     .2490331    .7862806
                                teahijob |   21.78613     19.957     1.09   0.275    -17.32888    60.90113
                                   _cons |   1.652741   1.777149     0.93   0.352    -1.830408    5.135889
                          --------------------------------------------------------------------------------
                          
                          ------------------------------------------------------------------------------
                            Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
                          -----------------------------+------------------------------------------------
                          country: Identity            |
                                            var(_cons) |   1.34e-23          .             .           .
                          -----------------------------+------------------------------------------------
                                         var(Residual) |   .4484908          .             .           .
                          ------------------------------------------------------------------------------
                          LR test vs. linear regression: chibar2(01) =     0.00 Prob >= chibar2 = 1.0000
                          
                          
                          **OLS:
                          
                          
                          . reg gdpgrowthlong loggdp91  avinvest avpopg schoolav rdtot div share1834 neighborgrowth teahijob
                          
                                Source |       SS       df       MS              Number of obs =      90
                          -------------+------------------------------           F(  9,    80) =    4.42
                                 Model |  20.0582298     9   2.2286922           Prob > F      =  0.0001
                              Residual |  40.3641729    80  .504552161           R-squared     =  0.3320
                          -------------+------------------------------           Adj R-squared =  0.2568
                                 Total |  60.4224027    89  .678903401           Root MSE      =  .71032
                          
                          --------------------------------------------------------------------------------
                           gdpgrowthlong |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          ---------------+----------------------------------------------------------------
                                loggdp91 |  -.0871432   .1162922    -0.75   0.456     -.318572    .1442857
                                avinvest |   4.658472    1.98771     2.34   0.022      .702803    8.614141
                                  avpopg |   .5820846   .2064008     2.82   0.006     .1713339    .9928352
                                schoolav |  -.0312137   .0533871    -0.58   0.560    -.1374574    .0750301
                                   rdtot |   .0279259   .0744772     0.37   0.709    -.1202884    .1761401
                                     div |   2.257493    2.35028     0.96   0.340    -2.419714    6.934699
                               share1834 |  -2.879823   2.720466    -1.06   0.293    -8.293723    2.534077
                          neighborgrowth |   .5176568   .1453692     3.56   0.001     .2283628    .8069509
                                teahijob |   21.78613    21.1676     1.03   0.306    -20.33873    63.91099
                                   _cons |   1.652741   1.884951     0.88   0.383    -2.098432    5.403913
                          I will indeed rerun both models with ML and REML and look up which model would theoretically fit my analysis better.

                          I found more information here: http://www.stata.com/stata12/panel-data/

                          Comment


                          • #14
                            Does your dependent variable GDP (gdpgrowthlong) varies within the units? You have group(s) with only 1 observation which is not acceptable in multi-level model.
                            Type something like this before you begin and exclude from the model non-varying countries.
                            Code:
                            table country, c(mean gdpgrowthlong​ sd gdpgrowthlong n gdpgrowthlong​)
                            xtmixed gdpgrowthlong || country:, mle var

                            Comment


                            • #15
                              You have group(s) with only 1 observation which is not acceptable in multi-level model.
                              That is not correct. Singleton groups are acceptable in multi-level models, and occur frequently in some types of work. What is problematic is when there are singleton groups and the robust cluster estimator is used. It does not appear that the original poster has done that. Also, the usual manifestation of that problem is missing standard errors.

                              Comment

                              Working...
                              X