Lab Exercise 10
Please upload the knitted .pdf
file on Moodle by 23:59.
responses_dif <- read.table("https://raw.githubusercontent.com/sunbeomk/PSYC490/main/respnoses_dif.txt")
group <- read.table("https://raw.githubusercontent.com/sunbeomk/PSYC490/main/group.txt")
group <- unlist(group)
Perform a multiple group IRT DIF test to determine whether the first item has DIF. Use the rest of the items (items 2~15) as the anchor set (i.e., items assumed to have no DIF).
Write a for loop that sequentially performs multiple group IRT DIF test to determine whether each item (item 1 ~ item 15) has DIF. At the i-th iteration, use the remaining 14 items as the anchor set. Print the adjusted \(p\) values from the DIF test corresponding to each item.
hint: From problem 1, dif_test$adj_pvals
returns the adjusted \(p\) value.
- In a single window (3-by-3), draw the ICC plots of the first 9 items for the two groups (the reference and the focal group). When fitting the multiple group IRT model, use the last 6 items (i.e., item 10 ~ item 15) as the anchor items.