Although there is no agreement upon "relative importance for predictors" with (even) linear models (one possible definition: lmg method), I would still want to know whether there are some acceptable methods to do it, if I build a Generalized Additive Model.
It's a natural question about which predictor is more important or useful (quantitatively, e.g., using percentage), isn't it?
relaimpo package can calculate several relative importance metrics for the linear model, but it can not handle GAM models (see Here).
Here is an example:
library(relaimpo) library(mgcv) gam1 <- gam(mpg ~ s(drat) + s(wt) + s(qsec), data = mtcars, method = "REML") summary(gam1)
summary() result, we can see which predictor is "significant" by p-value:
Approximate significance of smooth terms: edf Ref.df F p-value s(drat) 1.000 1.000 0.523 0.476069 s(wt) 2.487 3.028 21.950 1.59e-08 *** s(qsec) 1.000 1.000 15.241 0.000545 ***
But we don't know their "relative importance", for example, can we get the following information?
`wt` has a relative importance of 60%, `qsec` has a relative importance of 30%, `drat` has a relative importance of 10%.
What's worse, because GAM doesn't have a real R-squared, I suppose
lmg method cannot be applied.