Skip to content

Methods

Item response functions

AbstractItemResponseModels.irf Function
julia
irf(model::ItemResponseModel, theta, i)
irf(model::ItemResponseModel, theta, i, y)

Evaluate the item response function of an ItemResponseModel.

Arguments

  • model: An ItemResponseModel

  • theta: The person parameter value(s)

  • i: A unique item identifier

  • y: Response value(s)

Return values

If estimation_type(model) == PointEstimate then the item response function must return a scalar value.

If estimation_type(model) == SamplingEstimate then the item response function must return a vector of values with the length equal to the number of samples.

source

AbstractItemResponseModels.iif Function
julia
iif(model::ItemResponseModel, theta, i)
iif(model::ItemResponseModel, theta, i, y)

Arguments

  • model: An ItemResponseModel

  • theta: The person parameter value(s)

  • i: A unique item identifier

  • y: Response value(s)

Return values

If estimation_type(model) == PointEstimate then the item information function must return a scalar value.

If estimation_type(model) == SamplingEstimate then the item information function must return a vector of values with the length equal to the number of samples drawn.

source

AbstractItemResponseModels.expected_score Function
julia
expected_score(model::ItemResponseModel, theta; scoring_function)
expected_score(model::ItemResponseModel, theta, is; scoring_function)

Calculate the expected score of an ItemResponseModel.

Arguments

  • model: An ItemResponseModel

  • theta: The person parameter value(s)

  • is: One or multiple item identifiers. If is is omitted, the expected score for the whole test is returned.

Keyword arguments

  • scoring_function: A binary function of the form f(y, ctx) = x, mapping all possible response values y to

a value x. The argument ctx contains the current item context.

Return values

If estimation_type(model) == PointEstimate then expected_score must return a single scalar value.

If estimation_type(model) == SamplingEstimate then expected_score must return a vector of values with the length equal to the number of samples drawn.

source

AbstractItemResponseModels.information Function
julia
information(model::ItemResponseModel, theta; scoring_function)
information(model::ItemResponseModel, theta, is; scoring_function)

Calculate the information of an ItemResponseModel.

Arguments

  • theta: The person parameter value(s)

  • is: One or multiple item identifiers. If is is omitted, the information of the whole test (test information) is returned.

Keyword arguments

  • scoring_function: A binary function of the form f(y, ctx) = x, mapping all possible response values y to

a value x. The argument ctx contains the current item context.

Return values

If estimatione_type(model) == PointEstimate then information must return a single scalar value.

If estimation_type(model) == SamplingEstimate then information must return a vector of values with the length equal to the number of samples drawn.

source

Model fitting

StatsAPI.fit Function
julia
fit(::Type{T}, data::AbstractMatrix, args...; kwargs...)

Fit an item response model to response data.

Arguments

  • data: The observed response data. If data is a response matrix, the columns must describe items and rows describe persons.

  • args...: Additional arguments required to fit the ItemResponseModel

Keyword arguments

Return values

A fitted model with T <: ItemResponseModel.

source

Accessors

AbstractItemResponseModels.get_item_locations Function
julia
get_item_locations(model::ItemResponseModel, i)

Get the item locations for an item from an ItemResponseModel.

Arguments

Return values

If item_dimensionality(model) == Univariate and estimation_type(model) == PointEstimate then get_item_locations must return a single scalar value.

If item_dimensionality(model) == Multivariate and estimation_type(model) == PointEstimate then get_item_locations must return a vector of values corresponding to the dimensionality of the item parameters.

If item_dimensionality(model) == Univariate and estimation_type(model) == SamplingEstimate then get_item_locations must return a vector of values with the length equal to the number of samples drawn.

If item_dimensionality(model) == Multivariate and estimation_type(model) == SamplingEstimate then get_item_locations must return a matrix with rows corresponding to the drawn samples and columns corresponding to the dimension of the item parameter.

source

AbstractItemResponseModels.get_person_locations Function
julia
get_person_locations(model::ItemResponseModel, p)

Get the person locations for an person from an ItemResponseModel.

Arguments

Return values

If person_dimensionality(model) == Univariate and estimation_type(model) == PointEstimate then get_person_locations must return a single scalar value.

If person_dimensionality(model) == Multivariate and estimation_type(model) == PointEstimate then get_person_locations must return a vector of values corresponding to the dimensionality of the person parameters.

If person_dimensionality(model) == Univariate and estimation_type(model) == SamplingEstimate then get_person_locations must return a vector of values with the length equal to the number of samples drawn.

If person_dimensionality(model) == Multivariate and estimation_type(model) == SamplingEstimate then get_person_locations must return a matrix with rows corresponding to the drawn samples and columns corresponding to the dimension of the person parameter.

source

AbstractItemResponseModels.each_item_index Function
julia
each_item_index(model::ItemResponseModel)

Create an iterable object visiting each item index of an item response model.

source

AbstractItemResponseModels.each_person_index Function
julia
each_person_index(model::ItemResponseModel)

Create an iterable object visiting each person index of an item response model.

source