Data for Exercise 9.9
Magnesiu
A data frame/tibble with 20 observations on two variables
distance between samples
concentration of magnesium
Davis, J. (1986), Statistics and Data Analysis in Geology, 2d. Ed., John Wiley and Sons, New York, p. 146.
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
plot(magnesium ~ distance, data = Magnesiu)
model = lm(magnesium ~ distance, data = Magnesiu)
abline(model, col = "red")
summary(model)
#>
#> Call:
#> lm(formula = magnesium ~ distance, data = Magnesiu)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -1.5453 -0.7039 0.1234 0.6766 3.3006
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 5.768e+00 4.952e-01 11.647 8.15e-10 ***
#> distance -2.518e-04 4.027e-05 -6.254 6.73e-06 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 1.195 on 18 degrees of freedom
#> Multiple R-squared: 0.6848, Adjusted R-squared: 0.6673
#> F-statistic: 39.11 on 1 and 18 DF, p-value: 6.73e-06
#>
rm(model)