Main page: https://www.rdocumentation.org/packages/datasets/versions/3.6.2/topics/stackloss
stackloss
## Air.Flow Water.Temp Acid.Conc. stack.loss
## 1 80 27 89 42
## 2 80 27 88 37
## 3 75 25 90 37
## 4 62 24 87 28
## 5 62 22 87 18
## 6 62 23 87 18
## 7 62 24 93 19
## 8 62 24 93 20
## 9 58 23 87 15
## 10 58 18 80 14
## 11 58 18 89 14
## 12 58 17 88 13
## 13 58 18 82 11
## 14 58 19 93 12
## 15 50 18 89 8
## 16 50 18 86 7
## 17 50 19 72 8
## 18 50 19 79 8
## 19 50 20 80 9
## 20 56 20 82 15
## 21 70 20 91 15
stack.x
## Air.Flow Water.Temp Acid.Conc.
## [1,] 80 27 89
## [2,] 80 27 88
## [3,] 75 25 90
## [4,] 62 24 87
## [5,] 62 22 87
## [6,] 62 23 87
## [7,] 62 24 93
## [8,] 62 24 93
## [9,] 58 23 87
## [10,] 58 18 80
## [11,] 58 18 89
## [12,] 58 17 88
## [13,] 58 18 82
## [14,] 58 19 93
## [15,] 50 18 89
## [16,] 50 18 86
## [17,] 50 19 72
## [18,] 50 19 79
## [19,] 50 20 80
## [20,] 56 20 82
## [21,] 70 20 91
stack.loss
## [1] 42 37 37 28 18 18 19 20 15 14 14 13 11 12 8 7 8 8 9 15 15
require(stats)
summary(lm.stack <- lm(stack.loss ~ stack.x))
##
## Call:
## lm(formula = stack.loss ~ stack.x)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.2377 -1.7117 -0.4551 2.3614 5.6978
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -39.9197 11.8960 -3.356 0.00375 **
## stack.xAir.Flow 0.7156 0.1349 5.307 5.8e-05 ***
## stack.xWater.Temp 1.2953 0.3680 3.520 0.00263 **
## stack.xAcid.Conc. -0.1521 0.1563 -0.973 0.34405
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.243 on 17 degrees of freedom
## Multiple R-squared: 0.9136, Adjusted R-squared: 0.8983
## F-statistic: 59.9 on 3 and 17 DF, p-value: 3.016e-09