if (FALSE) {
# simulate Rasch model based data
# 100 persons, 20 items,
dat <- simul.rasch(100, items = seq(-3, 3, length.out = 20))
# reshape simulated data into 'long' format with balanced assignment
# of testees into two subgroups
dat.long <- reshape.rasch(dat, group = rep(0:1, each = nrow(dat) / 2))
# apply three-way analysis of variance with mixed classification for testing the Rasch model
aov.rasch(dat.long)
# extract variable names of items
vnames <- grep("it", names(aid_st2), value = TRUE)
# reshape aid subtest 2 data into 'long' format with split criterium sex
aid_long.sex <- reshape.rasch(aid_st2[, vnames], group = aid_st2[, "sex"])
# apply three-way analysis of variance with mixed classification for testing the Rasch model
aov.rasch(aid_long.sex)
}
Run the code above in your browser using DataLab