如果我们适合GAM,例如:
gam.fit = gam::gam(Outstate ~ Private + s(Room.Board, df = 2) + s(PhD, df = 2) +
s(perc.alumni, df = 2) + s(Expend, df = 5) + s(Grad.Rate, df = 2), data = College)
在哪里,我们使用数据集College
,该数据集可以在package中找到ISLR
。
现在,如果找到适合的摘要,则可以看到:
> summary(gam.fit)
Call: gam(formula = Outstate ~ Private + s(Room.Board, df = 2) + s(PhD,
df = 2) + s(perc.alumni, df = 2) + s(Expend, df = 5) + s(Grad.Rate,
df = 2), data = College)
Deviance Residuals:
Min 1Q Median 3Q Max
-7522.66 -1140.99 55.18 1287.51 7918.22
(Dispersion Parameter for gaussian family taken to be 3475698)
Null Deviance: 12559297426 on 776 degrees of freedom
Residual Deviance: 2648482333 on 762.0001 degrees of freedom
AIC: 13924.52
Number of Local Scoring Iterations: 2
Anova for Parametric Effects
Df Sum Sq Mean Sq F value Pr(>F)
Private 1 3377801998 3377801998 971.834 < 2.2e-16 ***
s(Room.Board, df = 2) 1 2484460409 2484460409 714.809 < 2.2e-16 ***
s(PhD, df = 2) 1 839368837 839368837 241.496 < 2.2e-16 ***
s(perc.alumni, df = 2) 1 509679160 509679160 146.641 < 2.2e-16 ***
s(Expend, df = 5) 1 1019968912 1019968912 293.457 < 2.2e-16 ***
s(Grad.Rate, df = 2) 1 148052210 148052210 42.596 1.227e-10 ***
Residuals 762 2648482333 3475698
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Anova for Nonparametric Effects
Npar Df Npar F Pr(F)
(Intercept)
Private
s(Room.Board, df = 2) 1 3.480 0.06252 .
s(PhD, df = 2) 1 1.916 0.16668
s(perc.alumni, df = 2) 1 1.471 0.22552
s(Expend, df = 5) 4 34.350 < 2e-16 ***
s(Grad.Rate, df = 2) 1 1.981 0.15971
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
在这里,我不理解“用于参数化效应的方差分析”和“用于非参数化效应的方差分析”部分的含义。尽管我确实了解ANOVA测试的工作原理,但我无法理解摘要中的“参数效应”和“非参数效应”部分。那么,它们是什么意思?它们的意义是什么?