In Stata 13, there is now the new command "meglm" (multilevel generalized linear models) to analyse hierarchical models. My question is, what is the difference between the "meglm" with family of Guassian and link function of Identity and the mixed linear models ("mixed")?
2 Answers
mixed
is explicitly written for this type of model, and is thus a bit more efficient in its implementation (read: quicker) than meglm
. Other than that they estimate the same model.
-
$\begingroup$ Thank you! I though so as well. However, does this mean that when two commands produce significantly different results there is something wrong with the methodology or data? $\endgroup$– ChayMar 23, 2015 at 12:36
-
$\begingroup$ My first step would be to center all my variables at some meaningful value within the range of your data. That tends to improve things a lot in this kind of models. You are estimating a model for the constant, and it helps when that constant refers to something that is actually observed. It is not strictly necessary, but if you extrapolate too much (e.g. uncentered year of birth means the constant refers to persons born in year 0) problems can occur. $\endgroup$ Mar 23, 2015 at 14:33
Essentially, they are the same. For example, the following commands give you the same results.
mixed dv iv || id:, cov(un) mle variance
meglm dv iv || id:, cov(un) family(gaussian)
But I feel meglm
may be better for 2 reasons,
If the iterations don't converge,
meglm
will change the starting value automatically. Butmixed
won't, I tried a model overnight, after 20000 times of iterations,mixed
was still running and didn't try changing a different starting value...of course, you can use theiterate(#)
options inmixed
to set the largest number of iterations, but that's different story.For my analysis models,
meglm
is much faster thanmixed
, at least save half the running time.