# NOT RUN {
# Emxaples below will run when flexMIRT software is installed
# in a default path of "C:/Program Files/flexMIRT3".
# Otherwise provide a path where flexMIRT software is installed
# in the argument 'dir.flex'.
# }
# NOT RUN {
# (1) run a single syntax file
# import an example of flexMIRT syntax file to run the item parameter estimation of IRT 3PL model
file.syntax <- system.file("extdata", "2PLM_example.flexmirt", package = "irtplay")
# run flexMIRT to estimate the item parameters of IRT 3PL model
run_flexmirt(file.syntax=file.syntax, dir.flex=NULL, show.output=TRUE)
# check the output file
out.file <- system.file("extdata", "2PLM_example-prm.txt", package = "irtplay")
bring.flexmirt(out.file, type="par")
# (2) run multiple syntax files
# import two examples of flexMIRT syntax files
file.syntax1 <- system.file("extdata", "2PLM_example.flexmirt", package = "irtplay")
file.syntax2 <- system.file("extdata", "3PLM_example.flexmirt", package = "irtplay")
# run flexMIRT to estimate the item parameters
run_flexmirt(file.syntax=c(file.syntax1, file.syntax2), dir.flex=NULL, show.output=FALSE)
# check the output file
out.file1 <- system.file("extdata", "2PLM_example-prm.txt", package = "irtplay")
out.file2 <- system.file("extdata", "3PLM_example-prm.txt", package = "irtplay")
bring.flexmirt(out.file1, type="par")
bring.flexmirt(out.file2, type="par")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab