我有我正在为其构建 GAM 模型的数据集,其中有许多预测因变量的因素。当我对模型进行总结时,我得到一个图表,表明“平滑项的重要性”(非常重要)。这代表什么?
这是一些数据的示例(完全由 btw 组成)。
gam.happiness_rating <- gam(data = ratehappiness2008, overall_happy ~ s(salary, k=3) + s(age, k=3) + as.factor(sex) + as.factor(year) + num_siblings + num_vacation)
summary(gam.happiness_rating)
Parametric coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 68.9221 5.4937 10.432 < 2e-14 ***
as.factor(sex)1 -12.3661 3.6232 -2.55 0.02346 **
as.factor(year)1999 21.4689 3.3060 2.262 2.03e-06 ***
num_siblings 1.2332 0.1082 1.648 0.02235 .
num_vacation -4.3824 3.3261 -1.233 0.132343
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Approximate significance of smooth terms:
edf Ref.df F p-value
s(salary) 2.111 1.723 15.843 < 2e-16 ***
s(age) 1.844 1.485 16.46 2.47e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1