[R-sig-ME] Fixed vs random effects with lme4

Yashree Mehta y@@hree19 @ending from gm@il@com
Thu Aug 23 19:05:43 CEST 2018

Thank you very much for your reply.

I see that the function "lm" is used for fixed effects and lmer for random
effects. I want to use lmer and specify a random intercept for the fixed
effects model. (In the terminology of efficiency analysis, it can be called
" fixed effects-random intercept" model.
To be more specific,

 A random intercept based on the Household_id is to be included for both
1) Where it is assumed that the random intercept is correlated with
X-covariates (Fixed effects)
2)Where this not assumed. i.e. a correlation of 0. (Random effects)

Having estimated the two models, I want to conduct the Hausman test.

Thanks again,


On Thu, Aug 23, 2018 at 5:43 PM John Poe <jdpo223 using g.uky.edu> wrote:

> Yep,
> Peter Westfall wrote up how to do it in an example script
> http://westfall.ba.ttu.edu/ISQS5349/Hausman_test_inR.txt
> Please be aware that the test does not imply that you shouldn't use random
> effects if there is correlation between a group-varying intercept and a
> lower level variable. It just means that you need to do something to
> properly model that correlation. That could be a within-group only model
> with dummy variables for groups (standard Fixed Effects models) or a
> group-mean centered model a la much of multilevel modeling. In econ this is
> known as a Hausman Taylor model (yes, the same Hausman as the test) or a
> correlated random effects model. You could also use a random slopes model
> to allow the variability in Xi across groups but it's less effective at
> debiasing than the other choices.
> On Thu, Aug 23, 2018 at 11:09 AM Yashree Mehta <yashree19 using gmail.com>
> wrote:
>> Hello,
>> Is there a way to conduct the Hausman test on models which have been
>> estimated using lme4?
>> To be more specific,
>> My model assumption is that the plot size(X covariate) is correlated with
>> the random intercept ( estimated from Household_ID) which will be
>> estimated. So I have to find out how to tell lmer to consider this
>> correlation. I would also, similarly, want to carry random effects where
>> this correlation assumption is done away with. Finally, I want to conduct
>> the Hausman test for model choice.
>> Thank you,
>> Regards,
>> Yashree
>>         [[alternative HTML version deleted]]
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> --
> Thanks,
> John
> John Poe, Ph.D.
> Postdoctoral Scholar / Research Methodologist
> Center for Public Health Services & Systems Research
> University of Kentucky
> www.johndavidpoe.com

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list