Generic interface

This page details the operations which should be supported by different ItemResponse elements, as well as traits for categorisation which can be used to dispatch to different operations.

Basic types

AbstractItemBank traits

Domain

FittedItemBanks.DomainTypeType
abstract type DomainType
DomainType(::AbstractItemBank) -> DomainType

Domain type for a item banks' item response functions. Used as a trait.

source
FittedItemBanks.DiscreteDomainType
abstract type DiscreteDomain <: DomainType

A discrete domain. Typically this is a sampled version of a continuous domain item bank.

Item response functions with discrete domains tend to support less operations than those with continuous domains.

source

Response

AbstractItemBank methods

Base.lengthMethod
length(item_bank::AbstractItemBank)

Returns the number of items in the item bank.

source
FittedItemBanks.subsetFunction
function subset(item_bank::AbstractItemBank, idxs)

Return a new item bank of the same type, with the items at the given indices.

source
FittedItemBanks.item_bank_domainFunction
item_bank_domain(
    item_bank::AbstractItemBank;
    zero_symmetric,
    items,
    thresh
) -> Tuple{Any, Any}

Given an item bank, this function returns the domain of the item bank, i.e. the range (lo, hi) which includes for each item the range in which the the item response function is changing.

source
Base.eachindexMethod
eachindex(item_bank::AbstractItemBank) -> Base.OneTo

Returns an AbstractUnitRange of item indices for the item bank.

source
FittedItemBanks.item_paramsMethod
item_params(
    item_bank::AbstractItemBank,
    idx
) -> NamedTuple{(:discrimination,), <:Tuple{Any}}

Returns the raw parameters for the item at idx as a named tuple. This may return nothing for some item banks. This is debugging/informational use only. Use (ItemResponse)[@ref] for actual item response functions.

source

ItemResponse methods

FittedItemBanks.respFunction
resp(ir::ItemResponse, θ) -> Float64  # For BooleanResponse item banks only
resp(ir::ItemResponse, outcome, θ) -> Float64

Return the value of the item response outcome function for the item response ir, the outcome outcome and the ability values θ. For BooleanResponse item banks, outcome can be omitted in which case the outcome is assumed to be true.

source
FittedItemBanks.resp_vecFunction
resp_vec(ir::ItemResponse, θ) -> AbstractVector{Float64}

Return the vector value of the item response function for the item response ir, the outcome outcome and the ability values θ.

The outcome at each index corresponds with the indices returned by the responses function.

source
FittedItemBanks.responsesFunction
responses(ir::ItemResponse) -> Any

Returns an AbstractVector of possible outcomes for a given (ItemResponse)[@ref].

source