Closed marcelglueck closed 7 months ago
Here too a fully reproducible example would help us to debug the problem.
Here the requested reprex. If you change EXPLO_number_splines from three to another value, model fitting fails. gdm_reprex.zip
I used EXPLO_number_splines=2
and the code worked fine. I also get a fitted model when running the example in the help docs:
gdmTabMod <- gdm(sitePairTab, geo=TRUE, splines=rep(4,11))
When I used EXPLO_number_splines=4
, the models do not fit. This is not a problem with the code, but rather the model cannot converge using 4 splines and your data. This is not surprising given the size of your dataset and the fact that most of your distance values = 0.
Hello all, first of all, thank you for providing this powerful piece of software to the scientific community.
I have quite complex models to fit for multiple species and sub-setting approaches. If I use the default settings (# splines 3), at least two models can be fit. However, as increasing the number of splines and knots might result in accommodating more complex models, I hoped I could get more models to fit by increasing these parameters. From the manual, it is not completely clear whether the number of knots is automatically adjusted for the number of splines requested. Hence, I decided to calculate the quantiles for the knots myself using the following approach:
However, if I pursue this approach, the two models that were fit with the default values fail. I tried different values for the number of splines (4, 5, 10, 50, 100) but still, no model can be fit. I am aware of the fact that the impact of these parameters is not fully understood yet (https://github.com/fitzLab-AL/gdm#gdm-fitting). However, I am really surprised that even changing the number of splines to 4 results in model fit failures and I still don't understand why.
Thank you for your assistance.