BaşlayınÜcretsiz Başlayın

Reading model diagnostics

gam.check() helps you understand whether you have enough basis functions to model the data.

After running checks on the model, answer the following question:

Which smooths do not have sufficient numbers of basis functions?

Bu egzersiz

Nonlinear Modeling with Generalized Additive Models (GAMs) in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

library(mgcv)
# Fit the model
mod <- gam(y ~ s(x0, k = 5) + s(x1, k = 5) + s(x2, k = 5) + s(x3, k = 5),
           data = dat, method = "REML")

# Run the check function
___
Kodu Düzenle ve Çalıştır