[R] lmer() vs. "fixed effects" regression

jjh21 jjharden at gmail.com
Thu Sep 24 18:37:47 CEST 2009


Hi,

First, some quick terminology I am using:
Fixed effects = model with unit dummy variables
Random effects = model without unit dummy variables, integrating unit-level
variance out of likelihood

I am confused about the difference between the multilevel modeling framework
of lmer() and a "fixed effects" model with unit dummy variables. Say I had
the following model with individual-level variable x, estimated with lmer():

model1 <- lmer(y ~ x + (1|unit))

How is model1 different from this?:

model2 <- lm(y ~ x + factor(unit))

I was under the impression that the lmer() function was a "random effects"
estimator as I have defined above. But if you use the command ranef(model1),
R returns unit-specific deviations from the intercept. This seems to be more
in line with the fixed effects estimator that returns intercept estimates
for each unit.

Question 2: Why is it that I can add in unit-level predictors into lmer(),
which I cannot do in a standard fixed effects model with unit dummies?

Thank you.

-- 
View this message in context: http://www.nabble.com/lmer%28%29-vs.-%22fixed-effects%22-regression-tp25577800p25577800.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list