3
$\begingroup$

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")?

$\endgroup$

2 Answers 2

3
$\begingroup$

mixedis 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.

$\endgroup$
2
  • $\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$
    – Chay
    Mar 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
1
$\begingroup$

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,

  1. If the iterations don't converge, meglm will change the starting value automatically. But mixed 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 the iterate(#) options in mixed to set the largest number of iterations, but that's different story.

  2. For my analysis models, meglm is much faster than mixed, at least save half the running time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.