Statalist


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

st: RE: disagreement between xtreg and xtmixed outputs


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   st: RE: disagreement between xtreg and xtmixed outputs
Date   Tue, 30 Jun 2009 01:36:59 +0900

José Maria Pacheco de Souza wrote:

I ran xtreg and xtmixed (and 1oneway) with the same dataset but got 
different results, as I show bellow:

[output omitted]

 I am using version 10 updated, intercooled. The data is in the long format.
 I followed the models presented in pages 64 and 65 of  Sophia 
Rabe-Hesketh´s Multilevel and Longitudinal Modeling Using Stata, second 
edition and really am puzlled with the no concordance of results. Could it 
be some problem with my data set (which is not that presented by Sophia)?

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

You wouldn't necessarily expect exact concordance between -loneway- and iterative asymptotic methods like -xtmixed , ml- or -xtreg , mle-.  

Regardless, it looks as if -xtreg , mle- is having trouble with the extremely high intraclass correlation (tiny within-ID variance):  for -xtreg , ml-, you've got zero for the standard error of the within-ID variance estimate and missing values for the standard error and confidence limits for the intraclass correlation coefficient.  -xtmixed- gets a boost from the expectation-maximization to get its initial estimates into the ballpark before starting the Newton-Raphson iterations where numerical difficulties would arise (note also that -xtreg , ml- has zero iterations).

With only 30 clusters and an expectation of vanishingly small within-cluster variance, I'd suggest staying with -anova-, -loneway- or -xtreg , fe- over the iterative methods.

You can use code below in order to explore the limits of -xtreg , ml- under these kinds of conditions.

Joseph Coveney

clear *
set more off
drawnorm mensuração0 mensuração1, n(30) corr(1 0.99396 \ 0.99396 1) ///
  sd(1.080263 1.080263) means(2.132833 2.132833) ///
  seed(`=date("2009-06-30", "YMD")')
generate byte id = _n
reshape long mensuração, i(id) j(time)

xtreg mensuração, i(id) mle
xtreg mensura, i(id) fe
xtmixed mensuração || id:, ml
loneway mensuração id

exit





*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index