How to do it...

Perform the following step to diagnose the generalized additive model:

  1. Generate the diagnostic plot using gam.check on the fitted model:
        > gam.check(fit)
Output:
Method: GCV Optimizer: magic
Smoothing parameter selection converged after 7 iterations.
The RMS GCV score gradient at convergence was 8.79622e-06 .
The Hessian was positive definite.
The estimated model rank was 10 (maximum possible: 10)
Model rank = 10 / 10

Basis dimension (k) checking results. Low p-value (k-index<1) may
indicate that k is too low, especially if edf is close to k'.

k' edf k-index p-value
s(nox) 9.000 8.434 0.397 0
Diagnostic plot of fitted gam
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset