LoslegenKostenlos loslegen

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?

Diese Übung ist Teil des Kurses

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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

# Check pairwise concurvity
___
Code bearbeiten und ausführen