Methods
Item response functions
AbstractItemResponseModels.irf Function
irf(model::ItemResponseModel, theta, i)
irf(model::ItemResponseModel, theta, i, y)Evaluate the item response function of an ItemResponseModel.
Arguments
model: AnItemResponseModeltheta: The person parameter value(s)i: A unique item identifiery: 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.
AbstractItemResponseModels.iif Function
iif(model::ItemResponseModel, theta, i)
iif(model::ItemResponseModel, theta, i, y)Arguments
model: AnItemResponseModeltheta: The person parameter value(s)i: A unique item identifiery: 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.
AbstractItemResponseModels.expected_score Function
expected_score(model::ItemResponseModel, theta; scoring_function)
expected_score(model::ItemResponseModel, theta, is; scoring_function)Calculate the expected score of an ItemResponseModel.
Arguments
model: AnItemResponseModeltheta: The person parameter value(s)is: One or multiple item identifiers. Ifisis omitted, the expected score for the whole test is returned.
Keyword arguments
scoring_function: A binary function of the formf(y, ctx) = x, mapping all possible response valuesyto
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.
AbstractItemResponseModels.information Function
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. Ifisis omitted, the information of the whole test (test information) is returned.
Keyword arguments
scoring_function: A binary function of the formf(y, ctx) = x, mapping all possible response valuesyto
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.
Model fitting
StatsAPI.fit Function
fit(::Type{T}, data::AbstractMatrix, args...; kwargs...)Fit an item response model to response data.
Arguments
data: The observed response data. Ifdatais a response matrix, the columns must describe items and rows describe persons.args...: Additional arguments required to fit theItemResponseModel
Keyword arguments
kwargs...: Additional keyword arguments required to fit theItemResponseModel
Return values
A fitted model with T <: ItemResponseModel.
Accessors
AbstractItemResponseModels.get_item_locations Function
get_item_locations(model::ItemResponseModel, i)Get the item locations for an item from an ItemResponseModel.
Arguments
model: AnItemResponseModeli: A unique item identifier
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.
AbstractItemResponseModels.get_person_locations Function
get_person_locations(model::ItemResponseModel, p)Get the person locations for an person from an ItemResponseModel.
Arguments
model: AnItemResponseModelp: A unique person identifier
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.
AbstractItemResponseModels.each_item_index Function
each_item_index(model::ItemResponseModel)Create an iterable object visiting each item index of an item response model.
AbstractItemResponseModels.each_person_index Function
each_person_index(model::ItemResponseModel)Create an iterable object visiting each person index of an item response model.