据我所知,截距项的意义(y中的β 0 =β 0 +β 1 x +ɛ)通过比较零来测试给定模型(因此,不显着的β 0 = 0,并且显着的β 0 ≠0)。
如果确实是这种情况,那么为什么R中的一个简单线性模型(截距集(间接)为零)会产生显着系数呢?请参见下面的示例:
x = c(-5:50)
y = c(-5:50)
plot(y~x) # Plotting the relationship between y and x, obviously passing through zero
summary(lm(y~x))
Call: lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-1.638e-15 -5.034e-16 -1.994e-16 1.047e-16 3.016e-15
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.798e-15 2.153e-16 -1.764e+01 <2e-16
x 1.000e+00 7.772e-18 1.287e+17 <2e-16
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 9.401e-16 on 54 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 1.655e+34 on 1 and 54 DF, p-value: < 2.2e-16
Warning message:
In summary.lm(lm(y ~ x)) : essentially perfect fit: summary may be
unreliable
那么,我的另外一个问题是,基数R是如何计算截距系数的重要性的?