Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: xtmixed does not converge after 12 hours


From   "Will Hauser" <whauseriii@gmail.com>
To   <statalist@hsphsun2.harvard.edu>, "Raquel Rangel de Meireles Guimarães" <raquelrguimadem@gmail.com>
Subject   Re: st: xtmixed does not converge after 12 hours
Date   Mon, 18 Jul 2011 13:46:46 +0000

Start with the simple first. Do all of your level 2 units have an acceptable number of level one units (let's say 10-15 minimum)? Are there any level 2 units where the level one variable is a constant? Specifying random effects for that variable may be problematic.

In short, have you gone through all the steps to verify the data are suitable for multilevel analysis?  If so start with a fixed effects model, then progress to a random intercept, and then specify your random effects one at a time until you encounter the problem.

I would wager that there is some pattern in the data or a structural inadequacy that you're not seeing. Without knowing more about the data it is hard to say.

Will Hauser

------Original Message------
From: Raquel Rangel de Meireles Guimarães <raquelrguimadem@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
Date: Monday, July 18, 2011 3:11:04 AM GMT-0300
Subject: st: xtmixed does not converge after 12 hours

Hi all,

I wonder what to do when my hierarchical model does not converge. Below 
are two examples of unsuccessful models: the first did not converge 
after 12 hours, and the second could not estimate the standard error of 
the random effects. Is there an algorithm to maximize that is robust and 
can solve this problem?

Thanks in advance!

------------------------------------------------
. xtmixed matematica masculino branco pardo atrasado nse if ano==2007 || 
escola: nse_escola atraso_escola

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0:   log restricted-likelihood =  -10997238
Iteration 1:   log restricted-likelihood =  -10996463
Iteration 2:   log restricted-likelihood =  -10996431
Iteration 3:   log restricted-likelihood =  -10996429
numerical derivatives are approximate
flat or discontinuous region encountered
Iteration 4:   log restricted-likelihood =  -10996428
numerical derivatives are approximate
flat or discontinuous region encountered
Iteration 5:   log restricted-likelihood =  -10996428
Iteration 6:   log restricted-likelihood =  -10996428
Iteration 7:   log restricted-likelihood =  -10996428
Iteration 8:   log restricted-likelihood =  -10996428
Iteration 9:   log restricted-likelihood =  -10996428
Iteration 10:  log restricted-likelihood =  -10996428

Computing standard errors:
standard-error calculation failed

Mixed-effects REML regression                   Number of obs      =   
2161701
Group variable: escola                          Number of groups   =     
37324

                                                 Obs per group: min 
=         1
                                                                avg 
=      57,9
                                                                max 
=       536


                                                 Wald chi2(5)       =  
87370,55
Log restricted-likelihood =  -10996428          Prob > chi2        =    
0,0000

------------------------------------------------------------------------------
   matematica |      Coef.   Std. Err.      z    P>|z|     [95% Conf. 
Interval]
-------------+----------------------------------------------------------------
    masculino |   2,978831   ,0533462    55,84   0,000     2,874275    
3,083388
       branco |   9,053575   ,0892833   101,40   0,000     8,878583    
9,228567
        pardo |   8,989271    ,085402   105,26   0,000     8,821887    
9,156656
     atrasado |  -16,15816   ,0623462  -259,17   0,000    -16,28035   
-16,03596
          nse |   1,900536   ,0451125    42,13   0,000     1,812117    
1,988955
        _cons |   187,3911    ,128128  1462,53   0,000       187,14    
187,6422
------------------------------------------------------------------------------

------------------------------------------------------------------------------
   Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. 
Interval]
-----------------------------+------------------------------------------------
escola: Independent          |
                 sd(nse_es~a) |   ,0024835          .             
.           .
                 sd(atraso~a) |    ,000062          .             
.           .
                    sd(_cons) |   17,21811          .             
.           .
-----------------------------+------------------------------------------------
                 sd(Residual) |   38,40556          .             
.           .
------------------------------------------------------------------------------
LR test vs. linear regression:       chi2(3) =  2,7e+05   Prob > chi2 = 
0,0000

Note: LR test is conservative and provided only for reference.

----------------------------------------------------------------------------------------------------------

xtmixed leitura masculino branco pardo atrasado nse if ano==2007|| 
escola: nse_escola atraso_escola

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0:   log restricted-likelihood =  -10844088
Iteration 1:   log restricted-likelihood =  -10843330
Iteration 2:   log restricted-likelihood =  -10843299
Iteration 3:   log restricted-likelihood =  -10843297
Iteration 4:   log restricted-likelihood =  -10843297
Iteration 5:   log restricted-likelihood =  -10843297
Iteration 6:   log restricted-likelihood =  -10843297  (backed up)
Iteration 7:   log restricted-likelihood =  -10843297  (backed up)
Iteration 8:   log restricted-likelihood =  -10843297  (backed up)
Iteration 9:   log restricted-likelihood =  -10843297  (backed up)
Iteration 10:  log restricted-likelihood =  -10843297  (backed up)
Iteration 11:  log restricted-likelihood =  -10843297  (backed up)
Iteration 12:  log restricted-likelihood =  -10843297  (backed up)
Iteration 13:  log restricted-likelihood =  -10843297  (backed up)
Iteration 14:  log restricted-likelihood =  -10843297  (backed up)
Iteration 15:  log restricted-likelihood =  -10843297  (backed up)
Iteration 16:  log restricted-likelihood =  -10843297  (backed up)
Iteration 17:  log restricted-likelihood =  -10843297  (backed up)
Iteration 18:  log restricted-likelihood =  -10843297  (backed up)
Iteration 19:  log restricted-likelihood =  -10843297  (backed up)
Iteration 20:  log restricted-likelihood =  -10843297  (backed up)
Iteration 21:  log restricted-likelihood =  -10843297  (backed up)
Iteration 22:  log restricted-likelihood =  -10843297  (backed up)
Iteration 23:  log restricted-likelihood =  -10843297  (backed up)
Iteration 24:  log restricted-likelihood =  -10843297  (backed up)
Iteration 25:  log restricted-likelihood =  -10843297  (backed up)
Iteration 26:  log restricted-likelihood =  -10843297  (backed up)
Iteration 27:  log restricted-likelihood =  -10843297  (backed up)
Iteration 28:  log restricted-likelihood =  -10843297  (backed up)
Iteration 29:  log restricted-likelihood =  -10843297  (backed up)
Iteration 30:  log restricted-likelihood =  -10843297  (backed up)
Iteration 31:  log restricted-likelihood =  -10843297  (backed up)
Iteration 32:  log restricted-likelihood =  -10843297  (backed up)
Iteration 33:  log restricted-likelihood =  -10843297  (backed up)
Iteration 34:  log restricted-likelihood =  -10843297  (backed up)
Iteration 35:  log restricted-likelihood =  -10843297  (backed up)
Iteration 36:  log restricted-likelihood =  -10843297  (backed up)
--Break--
r(1);


-- 
Raquel Rangel de Meireles Guimarães
Professora Substituta do Departamento de Demografia, UFMG
Doutoranda em Demografia
http://ufmg.academia.edu/RaquelGuimaraes
Cedeplar - Centro de Desenvolvimento e Planejamento Regional

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index