MulaiMulai sekarang secara gratis

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?

Latihan ini adalah bagian dari kursus

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

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

# Check pairwise concurvity
___
Edit dan Jalankan Kode