I have seen this and similar questions all over the place, but no really satisfying answers: How can we quantify the contribution that each term in a GAM (using mgcv package) adds to the total Deviance explained or to adj. R²?
This post looks like someone found a nice way of deriving the deviance for each term and plotted it: GAM (mgcv): AIC vs Deviance Explained but doesn't demonstrate how they did it and hasn't been around this site for years.
Versions of the same question were asked here: How to get the variance explained by each term in a GAM and here: How to calculate percent partial deviance explained by each predictor variable in a GAM model? and here: Assessing variable importance in generalized additive models (GAM) and here: https://stackoverflow.com/questions/65137719/can-gam-vcomp-be-used-to-estimate-partial-deviance-explained-in-a-gam-with-gauls Here is a version of this question for mixed GAMs: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q3/022703.html
I stumbled upon this package: https://cran.r-project.org/web//packages//gam.hp/gam.hp.pdf which appears to have been written for this specific purpose, but it ain't running for me. There also seems to be this function: https://search.r-project.org/CRAN/refmans/collinear/html/f_gam_deviance.html, but I am neither sure what it does nor what the "resulting preference order" in the description text is.
There were hinds to answers given here: https://stat.ethz.ch/pipermail/r-help/2009-July/397343.html, here: https://stat.ethz.ch/pipermail/r-help/2011-November/295324.html, and here: https://stackoverflow.com/questions/38516139/gam-r-variance-explained-by-variable, although these also do not seem to have been satisfactory, are tidysome with larger models, and are probably not the way the plots in the first post above were created.
Are there any new solutions to this question? Does any of you know, how to easily reproduce the DEVIANCE plots given here: GAM (mgcv): AIC vs Deviance Explained ?
Curious to see what you bring up, Thanks for reading