write.GGUM2004 {GGUM}R Documentation

Writes a command file for 'GGUM2004'

Description

write.GGUM2004 creates a 'GGUM2004' command file according to the test characteristics. The file is saved in the 'GGUM2004' predefined installation folder.

Usage

write.GGUM2004(
  I,
  C,
  cutoff = 2,
  model = "GGUM",
  cmd.file = "cmd",
  data.file = "data",
  data.dir = tempdir()
)

Arguments

I

The number of items.

C

C is the number of observable response categories minus 1 (i.e., the item scores will be in the set \{0, 1, ..., C\}). It should either be a vector of I elements or a scalar. In the latter case it is assumed that C applies to all items.

cutoff

Either a number or a vector of I elements which defines the cutoff value. Default is 2.

model

A string identifying the model. Possible values are "GUM" or "GGUM" (default).

cmd.file

A character string defining the name to give to the command file. No file extension is required.

data.file

A character string defining the name of the data file. No file extension is required.

data.dir

A character string defining the path to the directory where the data file (possibly exported by function export.GGUM2004) is stored. This also determines the directory where the command file generated by this function will be exported to. By default a temporary directory is used, but the user can naturally specify a directory of her choice.

Value

A script file is saved in the directory where 'GGUM2004' is installed.

Details

This function prepares a 'GGUM2004' friendly command script, which may be used to run the 'GGUM2004' program (Roberts, Donoghue, & Laughlin, 2000; Roberts et al., 2006). 'GGUM2004' may be executed directly or may be called from R, see run.GGUM2004.

By default and for convenience, the command script is saved in the same directory where the data file resides (data.dir). By experience, we noticed that long directory paths (especially if spaces are included) make 'GGUM2004' fail to execute with error file not found. Therefore, a good advice is to choose data.dir wisely (short paths, no spaces).

Observe that this function is optimized for the Windows operating system because 'GGUM2004' is a Windows program.

Author(s)

Sebastian Castro-Alvarez, secastroal@gmail.com

References

Roberts JS, Donoghue JR, Laughlin JE (2000). “A general item response theory model for unfolding unidimensional polytomous responses.” Applied Psychological Measurement, 24, 3-32.

Roberts JS, Fang H, Cui W, Wang Y (2006). “GGUM2004: A Windows-Based Program to Estimate Parameters in the Generalized Graded Unfolding Model.” Applied Psychological Measurement, 30, 64-65.

Examples

I <- 6
C <- c(3, 3, 3, 5, 5, 5)
write.GGUM2004(I, C, model = "GGUM")


[Package GGUM version 0.5 Index]