Skip to content

API

Types

PersonParameters.EAP Type
julia
struct EAP{T<:Distributions.Distribution{Distributions.Univariate, Distributions.Continuous}, U<:Real} <: PersonParameterAlgorithm

Expected posterior estimation of person parameters of item response models. Use prior to specify the prior distribution of ability values.

domain can be used to restrict the domain for numerical integration. Defaults to extrema(prior), c.f. the whole support of the prior distribution.

Fields

  • prior: the prior distribution of person abilities

  • domain: the integration domain

source

PersonParameters.MAP Type
julia
struct MAP{T<:Distributions.Distribution{Distributions.Univariate, Distributions.Continuous}, U<:Roots.AbstractSecantMethod} <: PersonParameterAlgorithm

Maximum posterior estimation of person parameters of item response models. Use prior to specify the prior distribution of ability values.

Fields

  • prior: The prior distribution of person abilities

  • root_finding_alg

source

PersonParameters.MLE Type
julia
struct MLE{T<:Roots.AbstractSecantMethod} <: PersonParameterAlgorithm

Maximum likelihood estimation for person parameters of item response models.

source

PersonParameters.PersonParameter Type
julia
struct PersonParameter{U<:Real}

A container holding a single estimated person parameter.

Fields

  • value: the estimated ability value

  • se: the estimated standard error

Methods

  • value: Extract the person parameter estimate

  • se: Extract the standard error of estimation

source

PersonParameters.PersonParameterAlgorithm Type
julia
abstract type PersonParameterAlgorithm

An abstract type representing an estimation algorithm for person parameters of an item response model.

Each algorithm must implement the following functions:

  • optfun: The optimization function passed to the root finding algorithm

  • se: Calculation of the standard error of estimation. Defaults to 1/I(θ), where I is the test information at θ.

source

PersonParameters.PersonParameterResult Type
julia
struct PersonParameterResult{T<:AbstractItemResponseModels.ItemResponseModel, U<:PersonParameter, V<:PersonParameterAlgorithm} <: AbstractArray{U<:PersonParameter, 1}

A collection of estimated person parameters.

Fields

  • values: A vector of estimated person parameters

  • algorithm: The algorithm used for estimation

Methods

  • modeltype: Get the model type of the scaling model

  • algorithm: Get the algorithm used for estimation

source

PersonParameters.ResponsePatterns Type
julia
struct ResponsePatterns{T<:(AbstractVector)}

A struct holding unique response patterns of a data matrix.

source

PersonParameters.WLE Type
julia
struct WLE{T<:Roots.AbstractSecantMethod} <: PersonParameterAlgorithm

Warm's weighted likelihood estimation for person parameters of item response models.

References

  • Warm, T. A. (1989). Weighted likelihood estimation of ability in item response theory. Psychometrika, 54, 427-450. doi: 10.1007/BF02294627

source

Functions

PersonParameters.algorithm Method
julia
algorithm(pp)

Get the algorithm used to calculate the person parameters in pp.

Examples

julia
julia> pp = person_parameters(OnePL, fill(zeros(3), 5), zeros(3), MLE());

julia> algorithm(pp)
MLE{Roots.Secant}(Roots.Secant())

source

PersonParameters.ids Method
julia
ids(p)

Get the id mapping for the response patterns in p

source

PersonParameters.modeltype Method
julia
modeltype(pp)

Get the scaling model used to calculate the person parameters in pp.

Examples

julia
julia> pp = person_parameters(TwoPL, fill(zeros(3), 10), fill((a = 1.0, b = 0.0), 3), WLE());

julia> modeltype(pp)
TwoParameterLogisticModel

source

PersonParameters.patterns Method
julia
patterns(p)

Get the unique response patterns from p.

source

PersonParameters.person_parameter Method
julia
person_parameter(M, responses, betas, alg; init, kwargs...)

Estimate a single person parameter for an item response theory model M from a response vector (responses) given item parameters beta and an estimation algorithm alg.

Examples

1 Parameter Logistic Model

julia
julia> responses = [0, 1, 1, 0, 0];

julia> betas = [0.2, -1.3, 0.4, 1.2, 0.0];

julia> person_parameter(OnePL, responses, betas, MLE())
PersonParameter{Float64}(-0.34640709530672537, 0.9812365857368596)

3 Parameter Logistic Model

julia
julia> responses = [0, 1, 1];

julia> betas = [(a = 1.0, b = 0.3, c = 0.1), (a = 0.3, b = -0.5, c = 0.0), (a = 1.4, b = 1.1, c = 0.3)];

julia> person_parameter(ThreePL, responses, betas, WLE())
PersonParameter{Float64}(0.657715606325967, 1.5321777539977457)

source

PersonParameters.person_parameters Method
julia
person_parameters(M, responses, betas, alg)

Estimate person parameters for an item response theory model of type M given item parameters betas, an estimation algorithm alg and responses for each person.

responses can be a vector of responses where each entry corresponds to the responses for a person, or a response matrix with size(responses) == (n, length(betas)), i.e. each row of the response matrix corresponds to the responses of a single person.

Examples

1 Parameter Logistic Model

julia
julia> responses = [1 1 0; 0 1 0; 1 1 0; 0 0 1]
4×3 Matrix{Int64}:
 1  1  0
 0  1  0
 1  1  0
 0  0  1

julia> betas = [-0.1, 0.0, 1.0];

julia> person_parameters(OnePL, responses, betas, MLE());

source

PersonParameters.se Method
julia
se(alg, M, theta, betas)

Calculate the standard error for a person parameter estimate theta given an estimation algorithm (alg), a model type (M), and item parameters (betas).

source

PersonParameters.se Method
julia
se(pp)

Extract the standard error from a PersonParameter estimate pp.

Examples

julia
julia> pp = PersonParameter(0.5, 0.3);

julia> se(pp)
0.3

source

PersonParameters.value Method
julia
value(pp)

Extract the value from a PersonParameter estimate pp.

Examples

julia
julia> pp = PersonParameter(0.0, 1.0);

julia> value(pp)
0.0

source