run.GGUM2004: Call 'GGUM2004' and import the estimated parameters into R

View source: R/GGUM2004.R

run.GGUM2004R Documentation

Call 'GGUM2004' and import the estimated parameters into R

Description

run.GGUM2004 executes a previously exported 'GGUM2004' command file (via function write.GGUM2004). It returns the execution time, the item parameter estimates, and the person parameter estimates.

Usage

run.GGUM2004(
  cmd.file = "cmd",
  data.file = "data",
  datacmd.dir = tempdir(),
  prog.dir = "C:/GGUM2004",
  precision = 4
)

Arguments

cmd.file

A character string defining the name of 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.

datacmd.dir

A character string defining the path to the directory where both the data file (identified by the data.file parameter and exported by function export.GGUM2004) and the command file (identified by the cmd.file parameter and exported by function write.GGUM2004) are saved.

prog.dir

A character string defining the directory where 'GGUM2004' is installed (default: "C:/GGUM2004").

precision

Number of decimal places of the results (default = 4).

Value

run.GGUM2004 returns a list cointaning the following components:

time

The 'GGUM2004' execution time.

alpha

The estimated discrimination parameters (for GGUM).

delta

The estimated difficulty parameters.

taus

The estimated threshold parameters.

SE

The standard errors for the estimated item parameters.

theta

The estimated person parameters and their standard errors.

Details

Function run.GGUM2004 runs internally both functions read.item.GGUM2004 (to import the 'GGUM2004' item estimates into R) and read.person.GGUM2004 (to import the 'GGUM2004' person estimates into R).

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 datacmd.dir and prog.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

\insertRef

Robertsetal2006GGUM

Examples

## Not run: 
# Generate data:
C   <- c(3, 3, 3, 5, 5, 5)
I   <- 6
gen <- GenData.GGUM(750, I, C, seed = 125)
# Export data to 'GGUM2004':
export.GGUM2004(gen$data)
# Write command file:
write.GGUM2004(I, C, model = "GGUM")
# Run 'GGUM2004':
res.GGUM2004 <- run.GGUM2004()

## End(Not run)

GGUM documentation built on Sept. 8, 2023, 5:38 p.m.