# NOT RUN {
# item parameters
item_parm <- matrix(c(
1, NA, NA,
1, 2, NA,
1, 2, 0.25,
0, 1, NA,
2, 0, 1,
2, 0, 2),
nrow = 6,
byrow = TRUE
)
ncat <- c(2, 2, 2, 3, 3, 3)
model <- c(1, 2, 3, 4, 5, 6)
# single theta example
x <- 0.5
calc_info(x, item_parm, ncat, model)
# same as
info_1pl(x, 1)
info_2pl(x, 1, 2)
info_3pl(x, 1, 2, 0.25)
info_pc(x, c(0, 1))
info_gpc(x, 2, c(0, 1))
info_gr(x, 2, c(0, 2))
# multiple thetas example
x <- matrix(seq(0.1, 0.5, 0.1)) # column vector in matrix form
calc_info_matrix(x, item_parm, ncat, model)
# same as
array_info_1pl(x, 1)
array_info_2pl(x, 1, 2)
array_info_3pl(x, 1, 2, 0.25)
array_info_pc(x, c(0, 1))
array_info_gpc(x, 2, c(0, 1))
array_info_gr(x, 2, c(0, 2))
# }
Run the code above in your browser using DataLab