Data


allData is a list with 20 objects. 4 are the Winter 2018 exam files, 14 are the past exam files. 2 are gender and time cluster information for Winter 2018.

allData_Elements Name
1 WN2018_E4
2 WN2018_E3
3 WN2018_E2
4 WN2018_E1
5 WN2016_E1
6 WN2015_E4
7 WN2015_E3
8 WN2015_E2
9 WN2015_E1
10 WN2014_E4
11 WN2014_E3
12 WN2014_E2
13 WN2014_E1
14 WN2013_E4
15 WN2013_E3
16 WN2013_E2
17 WN2013_E1
18 FA2004_E3
19 WN2018_gender_3cluster
20 WN2018_gender_2cluster

41 Repeated Questions - matched to WN2018 term and original term

Number WN2018_Info OriginalTerm_Info
1 WN2018_E4_Q1 WN2013_E4_Q6
2 WN2018_E4_Q5 WN2013_E4_Q4
3 WN2018_E4_Q7 WN2015_E4_Q3
4 WN2018_E4_Q13 WN2013_E4_Q7
5 WN2018_E4_Q14 WN2013_E4_Q10
6 WN2018_E4_Q16 WN2015_E4_Q17
7 WN2018_E4_Q17 WN2015_E4_Q14
8 WN2018_E4_Q18 WN2015_E4_Q15
9 WN2018_E4_Q19 WN2014_E4_Q12
10 WN2018_E4_Q20 WN2013_E4_Q19
11 WN2018_E4_Q21 WN2013_E4_Q24
12 WN2018_E4_Q22 WN2015_E4_Q19
13 WN2018_E3_Q4 WN2015_E3_Q4
14 WN2018_E3_Q5 WN2013_E3_Q5
15 WN2018_E3_Q6 FA2004_E3_Q5
16 WN2018_E3_Q7 WN2014_E3_Q7
17 WN2018_E3_Q9 WN2015_E3_Q9
18 WN2018_E3_Q12 FA2004_E3_Q12
19 WN2018_E3_Q13 WN2013_E3_Q13
20 WN2018_E3_Q17 FA2004_E3_Q17
21 WN2018_E3_Q18 WN2013_E3_Q18
22 WN2018_E2_Q1 WN2013_E2_Q1
23 WN2018_E2_Q2 WN2015_E2_Q2
24 WN2018_E2_Q4 WN2014_E2_Q4
25 WN2018_E2_Q7 WN2014_E2_Q7
26 WN2018_E2_Q8 WN2013_E2_Q8
27 WN2018_E2_Q11 WN2013_E2_Q11
28 WN2018_E2_Q12 WN2013_E2_Q13
29 WN2018_E2_Q13 WN2014_E2_Q13
30 WN2018_E2_Q14 WN2013_E2_Q14
31 WN2018_E2_Q19 WN2015_E2_Q19
32 WN2018_E1_Q2 WN2016_E1_Q2
33 WN2018_E1_Q3 WN2014_E4_Q4
34 WN2018_E1_Q4 WN2013_E1_Q4
35 WN2018_E1_Q5 WN2014_E1_Q5
36 WN2018_E1_Q6 WN2014_E4_Q6
37 WN2018_E1_Q8 WN2013_E1_Q8
38 WN2018_E1_Q9 WN2016_E1_Q8
39 WN2018_E1_Q12 WN2015_E1_Q12
40 WN2018_E1_Q16 WN2013_E1_Q16
41 WN2018_E1_Q19 WN2014_E1_Q19

Data in format for Item Response Theory

17 exam files.

# Fall 2004 in a different format, worry about later (allData[[18]])
allDataLTM <- list()

for (i in 1:(length(allData) - 3)) {
  allDataLTM[[i]] <- allData[[i]][c(9:38)]
  allDataLTM[[i]] <- allDataLTM[[i]][, colSums(allDataLTM[[i]] != 0) > 0]
}

Latent Variable Modeling


diff_discr_list <- list()
# Do this for all 17 exam files...
diff_discr_list[[1]] <- data.frame(summary(ltm(allDataLTM[[1]] ~ z1))$coefficients)

Plot difficulty versus discrimination for each exam question

This only shows the 25 questions from Winter 2018 final exam. Next steps to plot all the repeated questions, in the original term and Winter 2018 term.

ggplot(coefTable[[1]], aes(Difficulty, Discrimination, color = Question)) + 
  geom_point() + geom_text(aes(label=Question), 
                           vjust = -.7, hjust = -.7, size = 3) + 
  geom_errorbar(aes(Difficulty, 
                    ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr), width = .1) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                    xmax = Difficulty + Standard.Error.Diff,
                    Discrimination), height = .06)

Repeated Questions


Winter 2018 Exam Questions

WN2018Table_E4 <- coefTable[[1]][c(1,5,7,13,14,16,17,18,19,20,21,22),] %>%
  mutate(Winter2018 = c("E4_Q1", "E4_Q5", "E4_Q7", "E4_Q13", "E4_Q14",
                        "E4_Q16", "E4_Q17", "E4_Q18", "E4_Q19",
                        "E4_Q20", "E4_Q21", "E4_Q22")) %>% 
  mutate(WN2018Exam = "E4")
WN2018Table_E3 <- coefTable[[2]][c(4,5,6,7,9,12,13,17,18),] %>%
  mutate(Winter2018 = c("E3_Q4", "E3_Q5", "E3_Q6", "E3_Q7", "E3_Q9",
                        "E3_Q12", "E3_Q13", "E3_Q17", "E3_Q18")) %>% 
  mutate(WN2018Exam = "E3")
WN2018Table_E2 <- coefTable[[3]][c(1,2,4,7,8,11,12,13,14,19),] %>%
  mutate(Winter2018 = c("E2_Q1", "E2_Q2", "E2_Q4", "E2_Q7", "E2_Q8",
                        "E2_Q11", "E2_Q12", "E2_Q13", "E2_Q14", "E2_Q19")) %>%
  mutate(WN2018Exam = "E2")
WN2018Table_E1 <- coefTable[[4]][c(2,3,4,5,6,8,9,12,16,19),] %>%
  mutate(Winter2018 = c("E1_Q2", "E1_Q3", "E1_Q4", "E1_Q5", "E1_Q6",
                        "E1_Q8", "E1_Q9", "E1_Q12", "E1_Q16", "E1_Q19")) %>%
  mutate(WN2018Exam = "E1")

WN2018Table <- rbind(WN2018Table_E1, WN2018Table_E2) %>%
  rbind(WN2018Table_E3) %>% rbind(WN2018Table_E4) %>% mutate(Term = "WN2018")
ggplot(WN2018Table, aes(Difficulty, Discrimination, color = Question)) + 
  geom_point() + 
  geom_errorbar(aes(Difficulty, 
                    ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr), width = .1) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                    xmax = Difficulty + Standard.Error.Diff,
                    Discrimination), height = .06) + geom_text(aes(label=Question), 
                           vjust = -.7, hjust = -.7, size = 3) + facet_wrap(~Info)

Original Exam Questions

ggplot(OGTable, aes(Difficulty, Discrimination, color = Question)) + 
  geom_point() + 
  geom_errorbar(aes(Difficulty, 
                    ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr), width = .1) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                    xmax = Difficulty + Standard.Error.Diff,
                    Discrimination), height = .06) + geom_text(aes(label=Question), 
                           vjust = -.7, hjust = -.7, size = 3) + facet_wrap(~Info)

All Repeated Questions

FullTable <- rbind(WN2018Table, OGTable)[c(9,8,7,1:6)]
FullTable$TermQuestion <- paste(FullTable$Info, FullTable$Question, sep = "_")
for (i in 1:nrow(FullTable)) {
  if(FullTable$Term[i] == "WN2018") {
    FullTable$TermQuestion[i] = ""
  }
}

Winter 2018 Exam 1 Questions - Coefficients for OG and WN2018 terms

ggplot(filter(FullTable, WN2018Exam == "E1"), 
       aes(Difficulty, Discrimination, color = Term)) + 
  geom_point() + facet_wrap(~Winter2018, ncol = 3) +
  geom_errorbar(aes(ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr),
                width = .2) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                     xmax = Difficulty + Standard.Error.Diff),
                 height = .1) +
  geom_text(aes(label = TermQuestion), size = 2.5, x = -3, y = 1.75) + ylim(c(0,2))

Winter 2018 Exam 2 Questions - Coefficients for OG and WN2018 terms

ggplot(filter(FullTable, WN2018Exam == "E2"), 
       aes(Difficulty, Discrimination, color = Term)) + 
  geom_point() + facet_wrap(~Winter2018, ncol = 3) +
  geom_errorbar(aes(ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr),
                width = .2) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                     xmax = Difficulty + Standard.Error.Diff),
                 height = .1) +
  geom_text(aes(label = TermQuestion), size = 2.5, x = -3, y = 1.75) + ylim(c(0,2))

Winter 2018 Exam 3 Questions - Coefficients for OG and WN2018 terms

The OG terms for 3 of these questions are not plotted, because they are from Fall 2004.

ggplot(filter(FullTable, WN2018Exam == "E3"), 
       aes(Difficulty, Discrimination, color = Term)) + 
  geom_point() + facet_wrap(~Winter2018, ncol = 3) +
  geom_errorbar(aes(ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr),
                width = .2) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                     xmax = Difficulty + Standard.Error.Diff),
                 height = .1) +
  geom_text(aes(label = TermQuestion), size = 2.5, x = -1.75, y = 1.75) + ylim(c(0,2))

Winter 2018 Exam 4 Questions - Coefficients for OG and WN2018 terms

ggplot(filter(FullTable, WN2018Exam == "E4"), 
       aes(Difficulty, Discrimination, color = Term)) + 
  geom_point() + facet_wrap(~Winter2018, ncol = 3) +
  geom_errorbar(aes(ymin = Discrimination - Standard.Error.Discr,
                    ymax = Discrimination + Standard.Error.Discr),
                width = .2) +
  geom_errorbarh(aes(xmin = Difficulty - Standard.Error.Diff,
                     xmax = Difficulty + Standard.Error.Diff),
                 height = .1) +
  geom_text(aes(label = TermQuestion), size = 2.5, x = -3, y = 1.75) + ylim(c(0,2.5))