2
$\begingroup$

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?

$\endgroup$

1 Answer 1

1
$\begingroup$

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).

$\endgroup$
2
  • $\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$
    – ecology
    Commented 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$
    – usεr11852
    Commented Mar 18, 2020 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.