Learn R Programming

irtplay (version 1.6.2)

write.flexmirt: Write a "-prm.txt" file for flexMIRT

Description

This function writes an output file of "-prm.txt" for flexMIRT (Cai, 2017). The current version of this function can be used only for the unidimensional IRT models.

Usage

write.flexmirt(x, file = NULL, norm.pop = c(0, 1), rePrm = TRUE)

Arguments

x

A data frame containing the item metadata (e.g., item parameters, number of categories, models ...). See irtfit, test.info, or simdat for more details about the item metadata. This data frame can be easily obtained using the function shape_df.

file

The destination file name.

norm.pop

A numeric vector of two components specifying a mean and standard deviation of the normal population distribution. Default is c(0,1).

rePrm

A logical value indicating whether the item parameters in the item metadata are the reparameterized item parameters. If TRUE, the item intercepts and logits of item guessing parameters should be included in the item metadata. If FALSE, the item difficulty and item guessing parameters should be included in the item metadata.

Value

A "-prm.txt" file.

References

Cai, L. (2017). flexMIRT 3.5 Flexible multilevel multidimensional item analysis and test scoring [Computer software]. Chapel Hill, NC: Vector Psychometric Group.

Examples

Run this code
# NOT RUN {
## use the simulated CAT data
# extract the item metadata
x <- simCAT_MX$item.prm

# set a name of "-prm.txt" file
temp_prm <- file.path(tempdir(), "temp-prm.txt")

# write out the "-prm.txt" file
write.flexmirt(x, file=temp_prm, norm.pop=c(0, 1), rePrm=FALSE)

# }

Run the code above in your browser using DataLab