Description Usage Arguments Details Value Author(s) References See Also Examples
The winsteps
function sends a command file to the program Winsteps and returns the resulting item and person information, optionally saving them as output files. as.winsteps
converts its arguments into an object of class “winsteps”.
1 2 3 4 5 |
cmd |
a command file object, created using |
cmdfile |
a path to the command file, when running |
outfile |
a path to which the standard Winsteps output will be written |
ifile |
a path to the item file, when running |
pfile |
a path to the person file, when running |
newdir |
an optional, temporary, directory for reading and writing files, defaulting to the current working directory |
run |
boolean, with default |
windir |
the directory for the Winsteps program, which is sent to the Windows command prompt. If the directory is already included in the Windows PATH variable, the default |
daterun |
date and time the model was run |
comptime |
time required to run the model |
Winsteps is commercial software for analyzing item response data, primarily through applications of the Rasch model, a 1 parameter item response theory model. The winsteps
function interacts with Winsteps in batch mode and retrieves the two main output files produced by the program, referred to as an ifile, which contains item output, and a pfile, which contains person output.
The only argument required by winsteps
is a command file, which can be supplied directly as cmd
, a command file object of class “wcmd”, or which can be referenced with the filename cmdfile
. If both are included, the object is written to the filename.
cmdfile
, outfile
, ifile
, and pfile
are all used to write the corresponding Winsteps files when run = TRUE
. Regardless of whether Winsteps is run or not, the cmdfile
, ifile
, and pfile
will be read into R and returned. If the defaults are retained for these arguments the files will be deleted once the function has completed without errors.
Winsteps is called by invoking the operating system using the system
command. windir
can be used to specify the Winsteps directory folder (e.g., "c:/program files/winsteps"), should the system have a hard time finding it.
A list object of class “winsteps” containing:
cmd |
the command file |
ifile |
the item file |
pfile |
the person file |
daterun |
date and time the model was run |
comptime |
time required to run the model |
Anthony Albano tony.d.albano@gmail.com
Winsteps is commercial software, available at www.winsteps.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Simulate scores for 15 items and 100 people
set.seed(82911)
b <- seq(-3, 3, length = 15)
theta <- rnorm(100, 1)
rmat <- data.frame(ifelse(rirf(b, theta)$p > runif(1500), 1, 0))
# Item and person labels
colnames(rmat) <- paste("i", 1:15, sep = "")
rmat$name <- paste("p", 1:100, sep = "")
# Create a command file object
cmd <- wcmd(title = "R2Winsteps Example", data = "example.dat",
item1 = 1, ni = 15, name1 = 16, namelen = 5,
labels = paste("i", 1:15, sep = ""), hlines = "Y")
# The last two steps require access to a local directory and
# are not run
# Write the data to file
# write.wdat(rmat, cmd)
# Run Winsteps, with default filenames, not saving the
# command file or other output to file
# out <- winsteps(cmd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.