Skip to content
Prev 361099 / 398506 Next

mgcv::gam(): NA parametric coefficient in a model with two categorical variables + model interpretation

Q1: It looks like the model is not fully identifiably given the data and 
as a result igcCAT.ideo has been set to zero - there is no sensible test 
to conduct with such a term, hence the NAs in the test stat an p-value 
fields.

Q2: A separate (centred) smooth is estimated for each level of igc. If 
you want a baseline (igcCAT.pseudo) smooth, and difference smooths for 
the rest of the levels of igc then you need to set igc to be an ordered 
factor, and use something like...
~ igc + s(ctrial) + s(ctrial,by=igc)
- see section on `by' variables in ?gam.models.

best,
Simon
On 22/05/16 23:29, Fotis Fotiadis wrote: