Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a categorical fixed effect with 3 levels that I'm trying to enter into an LME.

a = lmer(Reaction ~ ContinuousEffect * CategoricalEffect + (1|Subject) + (1|StrengthOfStimulus))

StrengthOfStimulus is a numerical variable that's being used as a random effect, along with Subject.

Now, for some reason, when I run this model I only get information on two levels of the CategoricalEffect, when there are really three levels:

Fixed effects:
              Estimate Std. Error t value
(Intercept)   6.853550   0.035681  192.08
ContinuousEf -0.005463   0.002046   -2.67
TypeB        -0.213765   0.010707  -19.97
TypeC        -0.198775   0.010595  -18.76

Where A, B, and C are the levels of the CategoricalEffect.

What happened to level A?

share|improve this question

1 Answer

up vote 4 down vote accepted

In general, in a model which includes the intercept term (as yours does), the effect of a categorical predictor with k levels can be represented with k-1 codes. So, as expected, the effect of your 3-level predictor is represented with 2 codes (plus the intercept term). In this case, they appear to be "dummy codes," where the intercept represents the predicted value for a baseline category, here level A, and the two codes represent the deviations of the other groups from the baseline category.

None of this is specific to either lmer() or to mixed-effects models more generally; it is basic ANOVA theory.

share|improve this answer
1  
To see exactly how the contrasts are specified, try running contrasts(CategoricalEffect). You should see two columns of contrasts coefficients, where A is set to 0 in each column, and therefore acts as the reference level for both comparisons. – Marius May 8 '12 at 4:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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