I am new to GAM and comparing several subsets of these model from the same data(multiple covariates). Now if I set the "method" to "REML" and then compare their AIC values, would that be pointless? Also if I further want to compare the p-values of them what should be an appropriate method? I know ML is biased but since the pvalues for gam give less valid result for the method gcv relative to reml/ml, so should I use ML method as a whole? Sorry for my ignorance!


1 Answer 1


This is a can of worms...

If you are going to compare models in terms of AIC, thus choosing one model over another, and then try to interpret the p values of the chosen model, those p values no longer mean what they would if you'd just fitted one model and looked at the p values. They are now contingent upon you having done some previous testing/selection.

If you need to do model selection, I would look at the select argument or shrinkage smooths (bs = "ts" or bs = "cs") to implement selection via additional penalties, rather than comparing models via AIC.

However, when using REML smoothing selection, at least according to my reading of ?logLik.gam, the AIC is using the penalized maximum likelihood estimates regardless of whether smoothness selection is done using ML or REML. So the general problem of comparing models using likelihoods from models fitted using REML doesn't seem to apply to GAMs fitted by {mgcv}. This is because {mgcv} is using the conditional AIC which involves the likelihood of the model estimates at their penalized MLEs plus a correction for smoothness selection.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.