R/BSDA-package.R
Patrol.Rd
Data for Example 9.3
Patrol
A data frame/tibble with ten observations on three variables
number of tickets written per week
patrolperson's experience (in years)
natural log of tickets
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
model <- lm(tickets ~ years, data = Patrol)
summary(model)
#>
#> Call:
#> lm(formula = tickets ~ years, data = Patrol)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -15.412 -5.598 -1.217 3.291 21.995
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 55.938 6.215 9.001 1.85e-05 ***
#> years -2.932 0.615 -4.768 0.00141 **
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 11.21 on 8 degrees of freedom
#> Multiple R-squared: 0.7397, Adjusted R-squared: 0.7071
#> F-statistic: 22.73 on 1 and 8 DF, p-value: 0.001413
#>
confint(model, level = 0.98)
#> 1 % 99 %
#> (Intercept) 37.937415 73.937924
#> years -4.713667 -1.150832