R/BSDA-package.R
Drink.Rd
Data for Exercise 8.53
Drink
A data frame/tibble with 472 observations on two variables
a factor with levels ok
,
tolerated
, and immoral
a factor with levels for
, against
, and undecided
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
T1 <- xtabs(~drinking + referendum, data = Drink)
T1
#> referendum
#> drinking for against undecided
#> ok 95 83 21
#> tolerated 73 71 18
#> immoral 12 46 8
chisq.test(T1)
#>
#> Pearson's Chi-squared test
#>
#> data: T1
#> X-squared = 19.702, df = 4, p-value = 0.0005717
#>
rm(T1)