**************************************************************************** Three categories: * 1st category (<=5 years): 1st (lower) quartile; * 2nd category (>5 and > 12.25 years): inter quartile range; * 3rd category (>=12.25 years): 3rd (upper) quartile; **************************************************************************** # Creating matrix: years of programming experience vs. ratings ratings1_1_YearsProg <- matrix(c(10,21,14, 1,2,1, 10,15,5, 0,1,0), nrow = 4, ncol = 3, byrow = TRUE, dimnames = list(c("1st more cohesive", "2nd more cohesive", "Equally coh", "Don't know"), c("<=5", ">5 AND <12.25", ">=12.25"))) > ratings1_1_YearsProg <=5 >5 AND <12.25 >=12.25 1st more cohesive 10 21 14 2nd more \ncohesive 1 2 1 Equally coh 10 15 5 Don't know 0 1 0 > ratings2_1_YearsProg <- matrix(c(14,24,16, 3,5,2, 4,9,2, 0,1,0), nrow = 4, ncol = 3, byrow = TRUE, dimnames = list(c("1st more cohesive", "2nd more cohesive", "Equally coh", "Don't know"), c("<=5", ">5 AND <12.25", ">=12.25"))) > ratings2_1_YearsProg <=5 >5 AND <12.25 >=12.25 1st more cohesive 14 24 16 2nd more cohesive 3 5 2 Equally coh 4 9 2 Don't know 0 1 0 > ratings3_1_YearsProg <- matrix(c(2,4,0, 10,19,14, 9,15,6, 0,1,0), nrow = 4, ncol = 3, byrow = TRUE, dimnames = list(c("1st more cohesive", "2nd more cohesive", "Equally coh", "Don't know"), c("<=5", ">5 AND <12.25", ">=12.25"))) > ratings3_1_YearsProg <=5 >5 AND <12.25 >=12.25 1st more cohesive 2 4 0 2nd more \ncohesive 10 19 14 Equally coh 9 15 6 Don't know 0 1 0 # Executing the Fisher exact test between Years of Prog. Exp. and Ratings > fisher.test(ratings1_1_YearsProg, simulate.p.value = TRUE) Fisher's Exact Test for Count Data with simulated p-value (based on 2000 replicates) data: ratings1_1_YearsProg p-value = 0.7716 alternative hypothesis: two.sided > fisher.test(ratings1_1_YearsProg) Fisher's Exact Test for Count Data data: ratings1_1_YearsProg p-value = 0.7688 alternative hypothesis: two.sided > > fisher.test(ratings2_1_YearsProg, simulate.p.value = TRUE) Fisher's Exact Test for Count Data with simulated p-value (based on 2000 replicates) data: ratings2_1_YearsProg p-value = 0.8851 alternative hypothesis: two.sided > > fisher.test(ratings2_1_YearsProg) Fisher's Exact Test for Count Data data: ratings2_1_YearsProg p-value = 0.8749 alternative hypothesis: two.sided > > fisher.test(ratings3_1_YearsProg, simulate.p.value = TRUE) Fisher's Exact Test for Count Data with simulated p-value (based on 2000 replicates) data: ratings3_1_YearsProg p-value = 0.5867 alternative hypothesis: two.sided > fisher.test(ratings3_1_YearsProg) Fisher's Exact Test for Count Data data: ratings3_1_YearsProg p-value = 0.5863 alternative hypothesis: two.sided >