irt_function: The IRT magic function

View source: R/get_irt_function.R

irt_functionR Documentation

The IRT magic function

Description

This function is the core of the computer adaptive functionality. It takes a data frame of all the current items, and whether or not the current test is adaptive (IRT) whether or not the user has elected to exclude previous items, what those items were, whether or not the user elected to exclude eskimo, and whether the test is a 30-item static short form.

Usage

irt_function(
  all_items,
  IRT = TRUE,
  exclude_previous = FALSE,
  previous,
  exclude_eskimo = TRUE,
  walker = FALSE
)

Arguments

all_items

a dataframe of all items in the current test with responses appended

IRT

whether or not the test is adaptive

exclude_previous

excluding items used in a prior administration

previous

what those previous items were

exclude_eskimo

eclude the eskimo item for cultural sensitivity

walker

is it a walker short form test

Details

First, it creates a vector of all of the completed items in the current test Then adds any items from a previous test if there was one. Then uses the current test responses to generate an ability estimate, sem, and the next item How these are generated depends on the current test (adaptive or not, 175 or not, walker or not)

Value

A list with ability first then the next item then the sem


rbcavanaugh/pnt documentation built on Oct. 20, 2024, 7:21 p.m.