diff --git a/Connect Project R Markdown.Rmd b/Connect Project R Markdown.Rmd index ecb4bff..7a89256 100644 --- a/Connect Project R Markdown.Rmd +++ b/Connect Project R Markdown.Rmd @@ -270,18 +270,41 @@ head(Q13_data) # then analyze based on specific one Q13_data$Q13_recode <- factor(Q13_data$Q13_recode, levels = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), labels = c("Church of England", "Roman Catholic", "Methodist", "Other Christian", "Jewish", "Muslim", "Sikh", "Hindu", "Multi-Faith", "None of the above")) +# Test with only included levels +Q13_data$Q13_recode <- factor(Q13_data$Q13_recode, levels = c(1, 2, 4, 6), labels = c("Church of England", "Roman Catholic", "Other Christian", "Muslim")) +# No change with this one...still nonsignificant difference + # Q22 hist(Q13_data$Q22_average) specific_affiliation_test <- aov(Q22_average ~ Q13_recode, data = Q13_data) +typeof(Q13_data$Q13_recode) summary(specific_affiliation_test) # Q23 +specific_affiliation_test_Q23 <- manova(cbind(Q23_1, Q23_2) ~ Q13_recode, data = Q13_data) +summary(specific_affiliation_test_Q23) # Q27 +specific_affiliation_test_Q27 <- manova(cbind(Q27_1, Q27_2, Q27_3, Q27_4, Q27_5, Q27_6, Q27_7) ~ Q13_recode, data = Q13_data) +summary(specific_affiliation_test_Q27) ## Q15-16 with Q22, Q23, Q27 # Q15 is binary; 1st test whether difference in answers based on whether the school has an informal religious character or not. Q16 provides further detail and can be explored +religion_affiliation_data$Q15 <- factor(religion_affiliation_data$Q15, levels = c("No", "Yes"), labels = c("No", "Yes")) + + ## Q22 +informal_affiliation_test_Q22 <- t.test(Q22_average ~ Q15, data = religion_affiliation_data, paired = FALSE) +informal_affiliation_test_Q22 + + ## Q23 +informal_affiliation_test_Q23 <- manova(cbind(Q23_1, Q23_2) ~ Q15, data = religion_affiliation_data) +summary(informal_affiliation_test_Q23) + + ## Q27 +informal_affiliation_test_Q27 <- manova(cbind(Q27_1, Q27_2, Q27_3, Q27_4, Q27_5, Q27_6, Q27_7) ~ Q15, data = religion_affiliation_data) +summary(informal_affiliation_test_Q27) + ## Q21 with Q22, Q23, Q27 # Q21 is personal religious affiliation. This may be more tricky as it is a free answer...but can code the type of religious affiliation and test that way? -- would be chi-square or some sort of non-para analysis due to the small number of respondents who answered this