Skip to content
Prev 79566 / 398502 Next

testing non-linear component in mgcv:gam

In this case the models being compared are really identical, and the
P-value is meaningless numerical noise.

If your main focus is hypothesis testing and you really need near exact
p-values, then do this sort of testing using unpenalized models. i.e.
don't have mgcv::gam estimate the EDF of the smooth, just use
`s(...,fx=TRUE)' to estimate it unpenalized. This gives horrible point
estimates and excellent p-values.

best,
Simon