[R-sig-ME] Fixed vs random effects with lme4
y@@hree19 @ending from gm@il@com
Mon Sep 3 15:32:03 CEST 2018
Thanks for your explanation.
I now understand the two different references of the fixed effects model. I
want to conduct the Hausman test as described by you , " comparing beta in
a model with a group varying intercept random effect and beta in a model
where between group effects are segregated". The confusion arose because I
was referring to the household-specific within-transformation parameter
(fixed effect) as the random intercept.
The link which you provided is very helpful.
On Thu, Aug 23, 2018 at 7:42 PM John Poe <jdpo223 using g.uky.edu> wrote:
> I'm getting a bit confused by your language.
> A fixed effects model can either refer to a model with one intercept
> making no allowance for group variability (so all the effects are assumed
> fixed for the population) or a model where all between group variance is
> removed from the main variables via dummy variables, the within transform,
> first differencing or some other method and thus the betas represent the
> portion of the effect common to the population and thus fixed.
> If you want to do a hausman test you are comparing beta in a model with a
> group varying intercept random effect and beta in a model where between
> group effects are segregated via the above techniques. You do not include a
> random effect in both models.
> The hausman test is completely useless as a model specification tool if
> you're going to use both a group mean centered (within transform) to get
> the equivalent of a within group effects beta along with a group varying
> intercept (random effect).
> On Aug 23, 2018 1:05 PM, "Yashree Mehta" <yashree19 using gmail.com> wrote:
> 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:
>> Peter Westfall wrote up how to do it in an example script
>> 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>
>>> 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,
>>> [[alternative HTML version deleted]]
>>> R-sig-mixed-models using r-project.org mailing list
>> John Poe, Ph.D.
>> Postdoctoral Scholar / Research Methodologist
>> Center for Public Health Services & Systems Research
>> University of Kentucky
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models