CommencerCommencer gratuitement

Examining concurvity between auto variables

Now, let's look at concurvity between model variables.

After examining the pairwise concurvity between variables in mod, answer the following question:

Which two variables have the greatest worst-case concurvity?

Cet exercice fait partie du cours

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

library(mgcv)
# Fit the model
mod <- gam(hw.mpg ~ s(length) + s(width) + s(height) + s(weight), 
           data = mpg, method = "REML")

# Check pairwise concurvity
___
Modifier et exécuter le code