1

I have ran a glmm in r using glmmTMB from the glmmTMB package because my y variable (CVbetween) is from a beta distribution so I need to use family = beta_family.

When I look at the results with summary(model) It shows the results for the intercepts of certain fixed effects but it only show some results which is leaving me confused. For example, I have two options for the fixed effect "Method" it can be either Traditional or Novel but when looking at the results of the model it shows

Estimate Std. Error z value  Pr(>|z|) 
(Intercept)                 -2.687e+00  5.253e-01  -5.116  3.12e-07 ***
MethodTraditional            2.317e+00  2.978e-01   7.779  7.29e-15 ***

Why does itinclude one of the two options shouldn't it just say

Estimate Std. Error z value  Pr(>|z|) 
(Intercept)                 -2.687e+00  5.253e-01  -5.116  3.12e-07 ***
Method                       2.317e+00  2.978e-01   7.779  7.29e-15 ***

Code for model

model2 <- glmmTMB(CVbetween_n ~ Method * Known_Age + Length:Known_Age + Weight:Known_Age + cross2:Known_Age + (1|ID), data=data, family = beta_family)
model2
summary(model2)

It has the same issue for when I use cross2 as a fixed effect. There are three cross options "AT X AK" "AT X CK" "AK X CK"

but the results show values for

Known_Age:cross2AT X AK     
Known_Age:cross2AT X CK

this is super odd to me. Please let me know if I have done anything wrong.

Tim
  • 138,066

1 Answers1

1

Nothing is wrong here. The standard way of coding categorical variables for regression models is to use a dummy coding. For $k$ categories it uses $k-1$ binary variables because the final one is redundant. If we didn't do that, the variables would be perfectly collinear and we wouldn't be able to estimate the parameters. If you want to see all the categories, you need to remove the intercept from the model.

Tim
  • 138,066