# Gam with low E.D.F (estimated degrees of freedom) value in main effect, not interaction term

I have a gam model with the following structure:

gam(sv ~ s(day, bs="ts") + s(range, bs="ts") + s(time, bs="cc") +
ti(day, range, bs=c("ts", "ts")), data=train.all, method="REML")


In this model's summary range has an e.d.f of 0.95, and day,range has an e.d.f of 2.8

I have seen before that if a model term has an e.d.f close to 1 that you should change it to be a normal parametric term. I have two questions:

1. In this case, when the main effect appears parametric, do I also modify the interaction term between day and range to have range as parametric, or can you have a main effect that is parametric and in an interaction term it is a smooth?

2. I am using "ts" basis, so sometimes I receive values below 1 e.d.f that are more like 0.85 e.d.f. Does this still indicate a parametric term? I am a little confused how the value is slightly below 1, but not really close to 0.

Thank-you very much, Hannah

No, leave it in as an s() term; part of the wiggliness in range is taken up in the ti(day, range) term. In fact it would seem sensible to decide whether ti(day, range) is needed and if it is, refit the model with te(day, range) rather than the separate s() terms plus the ti() term, if only for the reduction in the number of smoothing parameters that need to be estimated (from 8 with your model to 4 for the te() version - which are doubled from the 4 or 2 parameters I think because of the shrinkage thin-plate splines you are using).
Values like this are common when you turn on shrinkage (either via shrinkage splines or via the double-penalty approach using select = TRUE. Both options allow shrinkage of the null space of the penalty matrix. This null space include the set of basis functions that are completely smooth. Without the shrinkage, the smoothness parameters would shrink the wiggly parts of the model until all that was left was the linear function. In that case the range space is shrunk by the smoothness parameter but not the null space.