当我使用 GAM 时,它给了我剩余的 DF 是(代码中的最后一行)。这意味着什么?超越 GAM 示例,一般来说,自由度的数量可以是非整数吗?
> library(gam)
> summary(gam(mpg~lo(wt),data=mtcars))
Call: gam(formula = mpg ~ lo(wt), data = mtcars)
Deviance Residuals:
Min 1Q Median 3Q Max
-4.1470 -1.6217 -0.8971 1.2445 6.0516
(Dispersion Parameter for gaussian family taken to be 6.6717)
Null Deviance: 1126.047 on 31 degrees of freedom
Residual Deviance: 177.4662 on 26.6 degrees of freedom
AIC: 158.4294
Number of Local Scoring Iterations: 2
Anova for Parametric Effects
Df Sum Sq Mean Sq F value Pr(>F)
lo(wt) 1.0 847.73 847.73 127.06 1.239e-11 ***
Residuals 26.6 177.47 6.67