# NOT RUN {
## the use of a "-prm.txt" file obtained from a flexMIRT
# import the "-prm.txt" output file from flexMIRT
flex_prm <- system.file("extdata", "flexmirt_sample-prm.txt", package = "irtplay")
# read item parameters and transform them to item metadata
test_flex <- bring.flexmirt(file=flex_prm, "par")$Group1$full_df
# set theta values
theta <- seq(-4, 4, 0.1)
# compute item and test information values given the theta values
x <- test.info(x=test_flex, theta=theta, D=1)
# draw a plot of the test information function
plot(x)
# draw a plot of the item information function for the second item
plot(x, item.loc=2)
# draw a plot of the item information function for the mutiple items
plot(x, item.loc=1:8)
# }
Run the code above in your browser using DataLab