est_winsteps {irt}R Documentation

Estimate Rasch Model using Winsteps

Description

This function serves as an interface to the Winsteps program, allowing for the convenient execution of basic Winsteps calibrations without the need to write Winsteps syntax manually. Please note that a valid installation of Winsteps is necessary for this function to operate. Keep in mind that it is still in beta mode, so exercise caution when using it.

Usage

est_winsteps(
  x,
  target_dir = getwd(),
  analysis_name = "winsteps_analysis",
  items = NULL,
  examinee_id_var = NULL,
  additional_vars = NULL,
  anchor_info = NULL,
  overwrite = TRUE,
  winsteps_exe_folder = file.path("C:/Winsteps"),
  verbose = TRUE
)

Arguments

x

A matrix or data frame that contains both response and person data.

target_dir

The directory where the analysis results will be saved. The default value is getwd().

analysis_name

A string that will be used for naming the files (data, control, output) and as the title of the analysis. The default is "winsteps_analysis".

items

A vector of strings representing item IDs within x to be used as response data, or a numeric vector indicating the columns containing response data. The default value is NULL, which uses all columns in x except those specified in examinee_id_var and additional_vars.

examinee_id_var

A string representing the column name containing examinee/subject IDs, or the column number of examinee/subject IDs. The default value is NULL, assuming no examinee/subject IDs.

additional_vars

A vector of strings or integers representing the column names or numbers to be included in the Winsteps data file. The default value is NULL, meaning no additional columns will be added to the Winsteps data file. Note that if items is NULL, all variables in the dataset will be treated as response data.

anchor_info

A matrix or data frame containing the sequence number and difficulty values of anchor items. The anchor matrix should have at least two columns: (1) either seq, indicating the column numbers of the anchor items in the response matrix, or item_id column containing the IDs of anchor items, and (2) b, the item difficulty values. The default value is NULL, meaning no anchor items are used.

overwrite

A logical value. If TRUE, existing control/data files will be overwritten. The default value is TRUE.

winsteps_exe_folder

The directory containing the Winsteps executable. The default value is file.path("C:/Winsteps").

verbose

If TRUE, the program will print intermediate steps.

Author(s)

Emre Gonulates

Examples

## Not run: 
true_theta <- rnorm(300)
ip <- generate_ip(n = 20, model = "Rasch")
resp_set <- generate_resp_set(ip = ip, theta = true_theta, prop_missing = .2)
resp_matrix <- as.matrix(resp_set)

est_pars <- est_winsteps(x = resp_matrix,
                         target_dir = "c:/temp/est_winsteps")

# Relationship between true and estimated item difficulty parameters
plot(x = ip$b, y = est_pars$ip$b, xlab = "True 'b'", ylab = "Estimated 'b'")
cor(x = ip$b, y = est_pars$ip$b)

# Relationship between true and estimated theta parameters
cor(x = true_theta, y = est_pars$raw_person_pars$MEASURE)
plot(x = true_theta, y = est_pars$raw_person_pars$MEASURE,
     xlab = "True 'b'", ylab = "Estimated 'b'")

## End(Not run)

[Package irt version 0.2.9 Index]