I am trying to model CO2 fluxes (fco2) using a number of environmental parameters using a GAM in mgcv.
Specifically, I have leaf temperature (tl), vapour pressure deficit (vpd), and soil water content (swc). vpd is a function of tl, air pressure and relative humidity (both not measured). I getting the best model response when I have a 3-way interaction between them, but also a relatively good one with an interaction between tl and vpd. Now I'm wondering about the following:
- I am getting a lower AIC using
s(), rather than
m2below. Which one is correct and why is this?
m1 <- gam(fco2 ~ s(tl) + s(vpd) + s(swc) + ti(tl, vpd), data=df, method='REML') m2 <- gam(fco2 ~ te(tl) + te(vpd) + te(swc) + ti(tl, vpd), data=df, method='REML')
- Since vpd is a function of tl (among other things), should one of the two variables be removed? This significantly increases AIC though and lowers R2.
Thanks a lot for the help