##Analysis of open grading weights library(here) here("Assessments", "AssessmentWeight.csv") ##brings in the data file Assessments <- read.csv(file = "3. AssessmentWeights.csv", header = T, sep=",") ##prints a few lines of the data file head(Assessments) ## 'Student' is categorical Assessments $Student <- as.factor(Assessments$Student) subset <- subset(Assessments, Group == "student") head(subset) ##RQ: Are assessment categories weighted differently by students? ##run one-way anova model = aov(Percentage.Weight~ Assessment.Category, data=subset) summary(model) TukeyHSD(model) ##Checking assumptions of the model # 1. Homogeneity of variances plot(model, 1) # 2. Normality plot(model, 2) ##summarize the data (mean, SE, etc.) library(Rmisc) summary = summarySE(Assessments, measurevar="Percentage.Weight", groupvars=c("Group", "Assessment.Category")) summary ##visualize the data # 1. Open jpeg file jpeg("Figure2.jpg", width = 550, height = 400) # 2. Create the plot ggboxplot(Assessments, x = "Assessment.Category", y = "Percentage.Weight", ylab = "Weight (%)", xlab = "Assessment", add = "jitter", color = "Group", palette = c("#E69F00", "#56B4E9")) # 3. Close the file dev.off()