BrunaLab / HeliconiaDemography

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

How is crossbasis smooth different from tensor product [te()] in mgcv package? #20

Closed Aariq closed 3 years ago

Aariq commented 3 years ago

Section 7.4.3 of Simon Wood's book is about distributed lag models, and even includes a 3-way interaction (ozone, temperature, and lag time). I know that bs = "cb" fits a tensor product spline in the background, but what does it even do differently than te()? I should try a te() version and compare plots.

Aariq commented 3 years ago

te() allows a by= argument, so at the very least this would give me an idea if it was appropriate to bypass the block on using by= for crossbasis smooths. This would allow the inclusions of by = habitat for both the plant size term and the SPEI history crossbasis function and let me include all the data in a single model. Not sure if you get statistical significance for the by= term though. Worth exploring.

Aariq commented 3 years ago

I explored this here: https://www.ericrscott.com/post/2021-02-08-tensor-product-dlnm/ For now, at least, I don't see a reason to switch to te() smooths and I'll continue using the dlnm package approach.