thuano
R语言中lm函数结果显示R方为1而残差的标准误差不为0,是什么原因啊? :cry:
> x<-seq(1,10,by=1)
> y<-seq(3,12,by=1)
> lmnm<-lm(y~x)
> summary(lmnm)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-5.661e-16 -1.157e-16 4.273e-17 2.153e-16 4.167e-16
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.000e+00 2.458e-16 8.138e+15 <2e-16 ***
x 1.000e+00 3.961e-17 2.525e+16 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.598e-16 on 8 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 6.374e+32 on 1 and 8 DF, p-value: < 2.2e-16