4.8
- library(readr)
- data4_3 <- read_csv("data4.3.csv")
- View(data4_3)
- lm4.3<-lm(y~x,data = data4_3)
- summary(lm4.3)
Call: lm(formula = y ~ x, data = data4_3) Residuals: Min 1Q Median 3Q Max -499.8 -152.5 -25.1 174.7 452.1 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.481e+02 1.182e+02 -5.485 6.6e-06 *** x 8.467e-02 4.882e-03 17.342 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 247.6 on 29 degrees of freedom Multiple R-squared: 0.912, Adjusted R-squared: 0.909 F-statistic: 300.7 on 1 and 29 DF, p-value: < 2.2e-16
- e<-resid(lm4.3)
- attach(data4_3)
- plot(x,e,ylim =