I'm using the gam.vcomp()
function to obtain the variance explained by each predictor in various GAMs fitted using the mgcv package in R.
Gam1 <- gam(presence = s(var1, k=10) + s(var2, k=10) + s(var3, k=10) + var4,
family=binomial))
Gam2 <- gam(presence = s(var1, k=10) + s(var2, var3, k=100) + var4, family= binomial))
The variance components returned by gam.vcomp()
are something like this:
- Gam1: s(var1)= 17, s(var2) = 14, s(var3) = 900
- Gam2: s(var1)= 16, s(var2,3)= 15
The results for the Gam1
seem plausible as I know that var3
is the most important one. I also know the var2,var3
interaction exists, but am not sure of its importance. The plots of the marginals suggest that the s(var2, var3)
interaction in model 2 does indeed capture the behaviour of both s(var2)
and s(var3)
from model 1, and that the importance of the interaction is sizable.
I am therefore unable to explain why the variance component for the s(var2, var3)
term is that low, much lower than the s(var3)
itself. Is there a plausible explanation for this? Am I missing something obvious?