Simulation code ready

This commit is contained in:
2024-01-04 17:03:04 +01:00
parent 466c2a1277
commit c0cdde3a03
4 changed files with 1571 additions and 114 deletions

View File

@ -19,11 +19,13 @@ generate_diff_irt <- function(J=7,M=4) {
for (j in 1:J){
difficulties[j,1] = qnorm(j/(J+1))
}
if (M>2) {
for (j in 1:J){
for (m in 2:(M-1)){
difficulties[j,m]= difficulties[j,1]+(m-1)*2/(M-2)
}
}
}
difficulties = difficulties-mean(difficulties)
return(difficulties)
}
@ -36,4 +38,9 @@ generate_diff_irt <- function(J=7,M=4) {
# GENERATE MATRIX FOR SIMULATION
###################################################
generate_diff_irt(J=4,M=2)
generate_diff_irt(J=4,M=4)
generate_diff_irt(J=7,M=2)
generate_diff_irt(J=7,M=4)