# Edps 589 # Fall 2021 # c.j.anderson # # 3-way practice # libaries you may need library(vcd) library(vcdExtra) library(DescTools) library(MASS) gss2018 <- expand.grid( religion=c("Protestant","Catholic","Jewish","Other","None"), political=c("Conservative","Liberal"), abortion =c("yes","no") ) # check to see what this yields # (helps to get counts in right order: gss2018 count = c(68, 32, 4, 22, 5, 113, 48, 11, 139, 17, 213, 59, 2, 30, 11, 78, 41, 1, 40, 5) # double check that data entry is correct (gss3 <- data.frame(gss2018,count))