# NOT RUN {
## import the "-prm.txt" output file from flexMIRT
flex_sam <- system.file("extdata", "flexmirt_sample-prm.txt", package = "irtplay")
# read item parameters and transform them to item metadata
x <- bring.flexmirt(file=flex_sam, "par")$Group1$full_df
# generate examinees' abilities from N(0, 1)
set.seed(10)
score <- rnorm(5, mean=0, sd=1)
# simulate the response data
data <- simdat(x=x, theta=score, D=1)
# set the ability values where the loglikelihood values are computed
theta <- seq(-3, 3, 0.5)
# compute the loglikelihood values (When MLE method is used)
llike_score(x=x, data=data, theta=theta, D=1, method="MLE")
# }
Run the code above in your browser using DataLab