Just started learning linear regression, started with a simple perfect linear regression example, X values are 1,2,3,4,5 and Y values are 1,2,3,4,5. And this is the summary iI am getting:
Residuals:
1 2 3 4 5
-4.828e-16 8.351e-16 -2.098e-16 -1.544e-16 1.196e-17
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.192e-15 6.050e-16 1.969e+00 0.144
X 1.000e+00 1.824e-16 5.482e+15 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.769e-16 on 3 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 3.005e+31 on 1 and 3 DF, p-value: < 2.2e-16
And this fromFrom this wee see that the estimated linear equation is y=x+1.192 and when we calculate the residuals for the first data point it should be 1-(1+1.92) -1.92. But why the residual output shows -4.8.
How is the residual is calculated here?