Can anyone point me to sources (publications, blog posts, videos etc) about the following problem? (The more conceptual the discussion, the better!)
I have the two explanatory GAMs below (in this example implemented with mgcv), and would like to compare the effect sizes of s(x1) and s(x2) in a more formal way than just visual comparison. In particular, I'd be interested in which smooth predicts more y_counts. Would integration of the x1 and x2 smooths be a feasible option?
mod1 <- gam(count_y ~ s(time) + s(x1) , data = dat, family = nb, method = 'REML', select = TRUE)
mod2 <- gam(count_y ~ s(time) + s(x2) , data = dat, family = nb, method = 'REML', select = TRUE)
The above models ignore some of the complexity of my real models, which include distributed lag (set up as a 7-column matrix, as in the code by Simon Wood in the gamair package) and additional covariates as follows:
mod3 <- gam(count_y ~ s(time) + te(x1, lag) + te(z, lag) , data = dat, family = nb, method = 'REML', select = TRUE)
mod4 <- gam(count_y ~ s(time) + te(x2, lag) +te(z, lag) , data = dat, family = nb, method = 'REML', select = TRUE)
Here te(x1, lag) and te(x2, lag ) model 3D-surfaces rather than 2D curves
I'd be very happy for responses about the more complex models too, but thought I'd first get the ball rolling on the simpler ones without the distributed lag.
te(x1, lag)
andte(x2, lag)
in the same model? $\endgroup$xX
over their respective ranges, sum the daily deaths from each simulation, and that yields a posterior for the cumulative deaths which you can then summarise with some quantiles. Do that for your models withx1
andx2
and you have the point estimates (plus uncertainties) to compare $\endgroup$