# 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)
resp <- c(0, 1, 0, 1, 0, 1)
nx <- 100
theta_init <- 0
theta_prop <- 1.0
set.seed(1)
theta_EB_single(nx, theta_init, theta_prop, item_parm[1, ], resp[1], ncat[1], model[1], 1, c(0, 1))
theta_EB(nx, theta_init, theta_prop, item_parm, resp, ncat, model, 1, c(0, 1))
Run the code above in your browser using DataLab