Skip to main content
19 events
when toggle format what by license comment
Aug 18 at 6:50 comment added mink @MarjoleinFokkema I do have the research question indicated at the bottom of the post, which is to compare the overall temporal effect of treatments. Aas well as the within year differences, therefore some interaction component must exist. I was using s(Year, by = Treatment) in my models in the post as you recommend, and the Treatment*Year was just part of different structure exploration to try and understand more about how the models operate. As mentioned, this is first exposure to GAMs :)
Aug 16 at 11:16 comment added Marjolein Fokkema @mink It is good to first get your research questions straight, before you fit the models, especially before checking significance. p-values are much more unstable than parameter estimates and fitted curves. that one model gives more significant values than another, is not important. You either want to fit a linear effect of time, then you throw in a linear interaction, Treatment*Year. Or, you want to fit a non-linear effect of time. Then you use s(Year, by = Treatment). I do not see the sense of applying a smooth to the interaction Treatment*Year.
Aug 16 at 9:05 comment added mink I also tried to perform an interaction of Treatment*Year. This works only with the S structure, and this time significance is more favored for gamm rather than gamm4. Finally, different structures of the data (completely randomized data), also have significant effects on the outputs of all models. At this point I am left even more confused and insecure about using GAMMs. The model structure letters (G,S,I,GS) are according to Pedersen et al. - 2019 - Hierarchical generalized additive models in ecology
Aug 16 at 9:04 comment added mink @MarjoleinFokkema Thank you. I must say that these model distinctions do make me wary of using either one. I will add that after running the models with different structures, I was getting different outcomes each time. Using the global smoother only (G), or either group specific smoothers (S or I), I would get the significance in the gamm4 model but not gamm (my original result in question). But when using a global smoother plus a group-level smoother that have the same wiggliness (GS) structure, the results became closely similar with no significance in both gamm4 and gamm.
Aug 14 at 20:18 history edited Marjolein Fokkema CC BY-SA 4.0
added 1419 characters in body
Aug 14 at 20:15 comment added Marjolein Fokkema @mink I updated my answer to reflect your changes. I would take the difference indicated by the gamm4 gam with a grain of salt, given it does not reproduce with the other models that should be essentially equivalent.
Aug 14 at 20:13 history edited Marjolein Fokkema CC BY-SA 4.0
added 1419 characters in body
Aug 13 at 10:18 comment added mink @MarjoleinFokkema , @BenBolker Added reproducible data with a modified model structure which appears better overall. I would like to add a question here - what would be the appropriate post-hoc for pairwise comparisons and validating the significance of the differences between the treatments indicated by the gamm4$gam?
Aug 12 at 12:44 history edited Marjolein Fokkema CC BY-SA 4.0
added 157 characters in body
Aug 12 at 11:44 history edited Marjolein Fokkema CC BY-SA 4.0
deleted 393 characters in body
Aug 11 at 23:15 comment added Ben Bolker Here the differences in the estimated SDs associated with the smooth components are very small, attributable to unimportant computational differences, and likely to be practically unimportant as well. The big differences seem to be in estimated uncertainty of the scale parameters/SDs, which are considerably harder to get at because uncertainty is estimated in different ways (in particular the $outer.info$hessian component that gam.vcomp uses to get confidence intervals on the SDs is missing, and not trivial to reconstruct ...
Aug 11 at 22:54 history edited Marjolein Fokkema CC BY-SA 4.0
added 1535 characters in body
Aug 11 at 22:50 comment added Marjolein Fokkema @BenBolker Good point, thanks. I added a reproducible example, which hopefully shows some relevant differences.
Aug 11 at 22:48 history edited Marjolein Fokkema CC BY-SA 4.0
added 1535 characters in body
Aug 11 at 22:32 comment added Marjolein Fokkema @mink I would have difficulty choosing the single model to trust, and would try to interpret results in tandem. AFAIK, computing (valid) p-values in (G)LMMs and thereby GAMs is not straightforward and I would therefore interpret them with care. Otherwise, if a single model must be picked, I would follow "gamm4 is more robust numerically than gamm", because the package author knows better than I do. As Ben suggests above, a reproducible example would be nice.
Aug 11 at 13:27 comment added mink @MarjoleinFokkema thank you. I am still not sure how to interpret this into practical means. On which should one rely, if at all. The difference, at least in my case, are quite large it seems coming down to one implying significance, and the other not.
Aug 10 at 20:17 comment added Ben Bolker PQL vs GHQ shouldn't be relevant when fitting a LMM (i.e., identity-link Gaussian response). I would love to see a reproducible example ... (this could also be tried with recent versions of glmmTMB, for further comparison ...
Aug 9 at 17:41 history edited Marjolein Fokkema CC BY-SA 4.0
added 143 characters in body
Aug 9 at 17:33 history answered Marjolein Fokkema CC BY-SA 4.0