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
FittedItemBanks.AbstractItemBank — Typeabstract type AbstractItemBankBase supertype for all item banks.
FittedItemBanks.ItemResponse — Typestruct ItemResponse{ItemBankT<:AbstractItemBank}item_bank::AbstractItemBankindex::Int64
An item response.
AbstractItemBank traits
Domain
FittedItemBanks.DomainType — Typeabstract type DomainTypeDomainType(::AbstractItemBank) -> DomainTypeDomain type for a item banks' item response functions. Used as a trait.
FittedItemBanks.DiscreteDomain — Typeabstract type DiscreteDomain <: DomainTypeA 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.
FittedItemBanks.ContinuousDomain — Typeabstract type ContinuousDomain <: DomainTypeA continuous domain.
FittedItemBanks.VectorContinuousDomain — Typestruct VectorContinuousDomain <: ContinuousDomainA continuous domain that is vector valued.
FittedItemBanks.OneDimContinuousDomain — Typestruct OneDimContinuousDomain <: ContinuousDomainA continuous domain that is scalar valued.
FittedItemBanks.DiscreteIndexableDomain — Typestruct DiscreteIndexableDomain <: DiscreteDomainAn discrete domain which is efficiently indexable and iterable.
FittedItemBanks.DiscreteIterableDomain — Typestruct DiscreteIterableDomain <: DiscreteDomainAn discrete domain which is only efficiently iterable.
Response
FittedItemBanks.ResponseType — Typeabstract type ResponseTypeResponseType(::AbstractItemBank) -> ResponseTypeA response type for an item bank. Used as a trait.
FittedItemBanks.BooleanResponse — Typestruct BooleanResponse <: ResponseTypeA boolean/dichotomous response.
FittedItemBanks.MultinomialResponse — Typestruct MultinomialResponse <: ResponseTypeA multinomial response, including ordinal responses.
AbstractItemBank methods
Base.length — Methodlength(item_bank::AbstractItemBank)Returns the number of items in the item bank.
FittedItemBanks.subset — Functionfunction subset(item_bank::AbstractItemBank, idxs)Return a new item bank of the same type, with the items at the given indices.
FittedItemBanks.subset_view — Functionfunction subset_view(item_bank::AbstractItemBank, idxs)Similar to above, but allow the usage of views.
FittedItemBanks.item_bank_domain — Functionitem_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.
Base.eachindex — Methodeachindex(item_bank::AbstractItemBank) -> Base.OneTo
Returns an AbstractUnitRange of item indices for the item bank.
FittedItemBanks.item_params — Methoditem_params(item_bank::AbstractItemBank, idx) -> NamedTuple
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.
ItemResponse methods
FittedItemBanks.resp — Functionresp(ir::ItemResponse, θ) -> Float64 # For BooleanResponse item banks only
resp(ir::ItemResponse, outcome, θ) -> Float64Return 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.
FittedItemBanks.resp_vec — Functionresp_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.
FittedItemBanks.responses — Functionresponses(ir::ItemResponse) -> Any
Returns an AbstractVector of possible outcomes for a given (ItemResponse)[@ref].