R/BSDA-package.R
Retail.Rd
Data for Exercise 9.59
Retail
A data frame/tibble with 10 observations on two variables
length of employment (in months)
employee gross sales (in dollars)
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
plot(sales ~ months, data = Retail)
model <- lm(sales ~ months, data = Retail)
abline(model, col = "blue")
summary(model)
#>
#> Call:
#> lm(formula = sales ~ months, data = Retail)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -1395.51 -668.62 0.97 626.75 1433.90
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 3246.39 574.50 5.651 0.000481 ***
#> months 49.85 29.89 1.668 0.133910
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 977.6 on 8 degrees of freedom
#> Multiple R-squared: 0.258, Adjusted R-squared: 0.1652
#> F-statistic: 2.782 on 1 and 8 DF, p-value: 0.1339
#>