I have a model with 5 multinomial levels coded 0 to 4:
library(mgcv)
gam = gam(
list(
level ~ generation * gender + s(long, lat) + s(id, bs = "re"),
~ generation * gender + s(long, lat) + s(id, bs = "re"),
~ generation * gender + s(long, lat) + s(id, bs = "re"),
~ generation * gender + s(long, lat) + s(id, bs = "re")
),
data = data,
family = multinom(K = 4)
)
summary(gam)
How can interpret the summary?:
Family: multinom
Link function:
Formula:
level ~ generation * gender + s(long, lat) + s(id, bs = "re")
~generation * gender + s(long, lat) + s(id, bs = "re")
~generation * gender + s(long, lat) + s(id, bs = "re")
~generation * gender + s(long, lat) + s(id, bs = "re")
Parametric coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.2018 0.2435 -9.042 < 2e-16 ***
generationYounger -0.2989 0.2890 -1.034 0.30096
genderFemale -0.0975 0.2870 -0.340 0.73403
generationYounger:genderFemale 0.3714 0.4097 0.907 0.36460
(Intercept).1 -3.5076 0.3136 -11.185 < 2e-16 ***
generationYounger.1 -0.2449 0.4032 -0.607 0.54353
genderFemale.1 0.3558 0.3952 0.900 0.36793
generationYounger:genderFemale.1 -1.0224 0.6592 -1.551 0.12088
[...]
generationYounger:genderFemale.3 -0.7765 1.1310 -0.687 0.4924
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
[...]
A multinomial model compares every level from 1 to x to the reference level 0 and has therefore x formulae. Do the coefficients with no extention in the summary correspond to level 1 compared to level 0 and .1
to level 2 compared to level 0 etc.? So is following relation correct?:
level number | coding for model | extention in summary |
---|---|---|
1 | 0 | [not in summary] |
2 | 1 | [none] |
3 | 2 | .1 |
4 | 3 | .2 |
5 | 4 | .3 |
And does generationYounger:genderFemale.1
correspond to the effect of Young and Female to manifest as level 2 compared to Older, Male, and level 0 (globally; to the intercept of the reference level) or compared to Older, Male, and level 2 (its own intercept)?