## cross-tabulation and chi-square test ## ADM 11/5/2007 load("sunstein.Rda") ## create cross-tab table(sunstein$decision, sunstein$party) ## conduct hypothesis test chisq.test(sunstein$decision, sunstein$party) ## compute chi-square p-value (from our in-class example) pchisq(7.0, df=2, lower.tail=FALSE)