I see that the caret package has support for gam objects for the varImp function. I was wondering if there was documentation about which method the function uses when gam is the input?
1 Answer
caret
uses the $p$-values as extracted by the associated variable. For the unsmoothed variables those are for the null hypothesis that the corresponding parameter is zero and for the smoothed variables for the null hypotheses that each smooth term is zero.
No docs available unfortunately, I read the code for gam
models in caret
directly. Please note that these are the null hypotheses postulated by mgcv::gam
itself (more details under ?summary.gam
).
-
$\begingroup$ Interesting. So the variable importance is determined with the variable p values? That seems quite questionable as a method for determining variable importance. $\endgroup$– ecologyCommented Mar 18, 2020 at 2:41
-
1$\begingroup$ It is a bit of a truism though. :) It is used for a quick, somewhat imperfect but relatively well-understood way to measure statistically significance which is itself is a reasonable proxy for variable importance. One can use more sophisticated methods like from the package
iml
to get more detailed info. $\endgroup$ Commented Mar 18, 2020 at 10:12