Interpréter les sorties des GAM

Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Noam Ross

Senior Research Scientist, EcoHealth Alliance

Récapitulatif des GAM

mod_hwy <- gam(hw.mpg ~ s(weight) + s(rpm) + 
               s(price) + s(comp.ratio) +
               s(width) + fuel + cylinders,
               data = mpg, method = "REML")
summary(mod_hwy)
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R
Family: gaussian
Link function: identity

Formula:
hw.mpg ~ s(weight) + s(rpm) + s(price) + s(comp.ratio) +
  s(width) + fuel

Parametric coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)   23.873      3.531   6.760 1.89e-10 ***
fuelgas        7.571      3.922   1.931   0.0551 .
 ---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***
s(rpm)        7.499  8.285  8.534 2.07e-09 ***
s(price)      2.681  3.421  1.678    0.155
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***
s(width)      1.001  1.001  0.357    0.551
 ---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =   0.89   Deviance explained = 90.1%
REML = 464.81  Scale est. = 5.171     n = 199
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Récapitulatif des GAM (3)

summary(mod_hwy)
Family: gaussian
Link function: identity

Formula:
hw.mpg ~ s(weight) + s(rpm) + s(price) +
  s(comp.ratio) + s(width) + fuel
...
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Récapitulatif des GAM (4)

summary(mod_hwy)
...
Parametric coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)   23.873      3.531   6.760 1.89e-10 ***
fuelgas        7.571      3.922   1.931   0.0551 .
 ---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 '
...
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Récapitulatif des GAM (5)

summary(mod_hwy)
...
Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***
s(rpm)        7.499  8.285  8.534 2.07e-09 ***
s(price)      2.681  3.421  1.678    0.155
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***
s(width)      1.001  1.001  0.357    0.551
 ---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
...
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Degrés de liberté effectifs

Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***  <--
s(rpm)        7.499  8.285  8.534 2.07e-09 ***
s(price)      2.681  3.421  1.678    0.155
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***  <--
s(width)      1.001  1.001  0.357    0.551      

Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Signification des termes lissés

Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***
s(rpm)        7.499  8.285  8.534 2.07e-09 ***
s(price)      2.681  3.421  1.678    0.155
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***
s(width)      1.001  1.001  0.357    0.551
 ---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Signification des termes lissés (2)

Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***  <--
s(rpm)        7.499  8.285  8.534 2.07e-09 ***  
s(price)      2.681  3.421  1.678    0.155      <--
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***
s(width)      1.001  1.001  0.357    0.551      

Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Signification et degrés de liberté effectifs

Approximate significance of smooth terms:
                edf Ref.df      F  p-value
s(weight)     6.254  7.439 20.909  < 2e-16 ***  
s(rpm)        7.499  8.285  8.534 2.07e-09 ***  
s(price)      2.681  3.421  1.678    0.155      <--
s(comp.ratio) 1.000  1.001 18.923 2.22e-05 ***  <--
s(width)      1.001  1.001  0.357    0.551      <--

Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Passons à la pratique !

Modélisation non linéaire avec les Generalized Additive Models (GAM) en R

Preparing Video For Download...