# NOT RUN {
## import the "-prm.txt" output file from flexMIRT
flex_sam <- system.file("extdata", "flexmirt_sample-prm.txt", package = "irtplay")
# select the first twenty dichotomous items and last polytomous item
# assuming that the test consists of twenty-one items
x <- bring.flexmirt(file=flex_sam, "par")$Group1$full_df[c(1:20, 55), ]
# generate examinees' abilities from N(0, 1)
set.seed(23)
score <- rnorm(500, mean=0, sd=1)
# simulate the response data
data <- simdat(x=x, theta=score, D=1)
# }
# NOT RUN {
# compute fit statistics
fit <- sx2_fit(x=x, data=data, nquad=30)
# fit statistics
fit$fit_stat
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab