I have the following mixed effect model;

penicillin_model = lmer(yield ~ treat + (1 | blend),
                    data = penicillin)

Treat contains 4 categories and blend contains 5 categories, am I correct in thinking that there are 9 parameters in my model? (one as the intercept, 3 fixed effects and 5 variances)? or would i need to add an error term? Hope that makes sense.

df = nrow(penicillin) - 9

#calculate p-value by comparing the t-value against the df
1 - pt(0.3643396, df) #treat B
1 - pt(1.8216981, df) #treat C
1 - pt(0.7286793, df) #treat D 

model output

enter image description here

  • $\begingroup$ Look in the output. How many parameters do you see? (Count the fixed effects, count the random effects). $\endgroup$ Commented Jun 25, 2022 at 17:50
  • $\begingroup$ @JeremyMiles Ok, so I have 4 fixed effects (one in the intercept) but the random effects are confusing me a little, would this be 5 as i have 5 types of blend or 2 as in the output i have 2 groups (blend and residual). I have updated the question with this info in the output $\endgroup$
    – Joe
    Commented Jun 25, 2022 at 17:57
  • $\begingroup$ There are no parameters you can't see. $\endgroup$ Commented Jun 25, 2022 at 21:40

1 Answer 1


You have four fixed effects - one for each level of group (well, except the reference, but this is replaced by the intercept).

You have two random effects: random intercept (of blend) and residual.

$4 + 2 = 6$ parameters.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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