BrunaLab / HeliconiaDemography

Effects of drought and habitat fragmentation on Heliconia acuminata.
Other
0 stars 1 forks source link

select = TRUE and getting p-values for DLNMs #19

Closed Aariq closed 3 years ago

Aariq commented 3 years ago

It seems like the current best method for getting p-values from GAMs (including DLNMs?) is to use the select = TRUE parameter in gam() and then interpret p-values from summary(model) (Marra and Wood 2011, see also: https://stats.stackexchange.com/questions/274151/anova-to-compare-models/274632#274632). This should allow the edf of a model term to shrink to 0, i.e. no longer part of the model, and the p-values from summary() take into account that you've done this variable selection step. However, in my experience, select = TRUE seems to make splines, including crossbasis functions, more wiggly, not less.

Should I be using select =TRUE?

Aariq commented 3 years ago

In these models, select=TRUE reduces the edf for crossbasis function and covariates. It has a minimal effect on the shape of the crossbasis function and the associated p-values. I think it seems like best practice to use this method, so I'm going with it, for now at least.

Aariq commented 3 years ago

I explored this more here: https://www.ericrscott.com/post/dlnm-p-values/