R/BSDA-package.R
Rainks.Rd
Data for Exercise 9.8
Rainks
A data frame/tibble with 35 observations on five variables
rainfall (in inches)
rainfall (in inches)
rainfall (in inches)
rainfall (in inches)
rainfall (in inches)
R. Picard, K. Berk (1990), Data Splitting, The American Statistician, 44, (2), 140-147.
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
cor(Rainks)
#> rain x1 x2 x3 x4
#> rain 1.0000000 0.7932854 0.8184772 0.7479617 0.8176309
#> x1 0.7932854 1.0000000 0.7686657 0.8826127 0.7199976
#> x2 0.8184772 0.7686657 1.0000000 0.7456419 0.7335268
#> x3 0.7479617 0.8826127 0.7456419 1.0000000 0.6384376
#> x4 0.8176309 0.7199976 0.7335268 0.6384376 1.0000000
model <- lm(rain ~ x2, data = Rainks)
summary(model)
#>
#> Call:
#> lm(formula = rain ~ x2, data = Rainks)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -0.94498 -0.21396 0.02443 0.25158 0.79037
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.53216 0.25223 2.110 0.0425 *
#> x2 0.77696 0.09494 8.184 1.9e-09 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 0.4608 on 33 degrees of freedom
#> Multiple R-squared: 0.6699, Adjusted R-squared: 0.6599
#> F-statistic: 66.97 on 1 and 33 DF, p-value: 1.897e-09
#>