# \donttest{
# dichotomous
response <- c(1,1,0)
item <- matrix(
c(
1, -0.5, 0,
1.5, -1, 0,
1.2, 0, 0.2
), nrow = 3, byrow = TRUE
)
adaptive_test(response, item, model = "dich", ability_method = "WLE")
# polytomous
response <- c(1,2,0)
item <- matrix(
c(
1, -0.5, 0.5,
1.5, -1, 0,
1.2, 0, 0.4
), nrow = 3, byrow = TRUE
)
adaptive_test(response, item, model="GPCM", ability_method = "WLE")
# mixed-format test
response <- list(c(0,0,0),c(2,2,1))
item <- list(
matrix(
c(
1, -0.5, 0,
1.5, -1, 0,
1.2, 0, 0
), nrow = 3, byrow = TRUE
),
matrix(
c(
1, -0.5, 0.5,
1.5, -1, 0,
1.2, 0, 0.4
), nrow = 3, byrow = TRUE
)
)
adaptive_test(response, item, model = "GPCM", ability_method = "WLE")
# continuous response
response <- c(0.88, 0.68, 0.21)
item <- matrix(
c(
1, -0.5, 10,
1.5, -1, 8,
1.2, 0, 11
), nrow = 3, byrow = TRUE
)
adaptive_test(response, item, model = "cont", ability_method = "WLE")
# }
Run the code above in your browser using DataLab