### CODE FOR CHI-SQUARE METHODS BIAS ## Set working drive setwd("/Users/") ## Load data df <- read.csv("MethodsBiasChiSqr.csv", header=TRUE, na.strings=c(""," ","NA")) ## Question 1: Is there an association between the nativity of response animals and whether or not the study authors mentioned response animal nativity? tble1 = table(df$nativity.mentioned, df$one.both) cs1 <- chisq.test(tble1) cs1 ## Question 2: Is there an association between the nativity of response animals and whether or not the study authors sought to study a specific animal? tble2 = table(df$studied.specific.animal, df$one.both) cs2 <- chisq.test(tble2) cs2