API
Types
PersonParameters.EAP Type
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 abilitiesdomain
: the integration domain
PersonParameters.MAP Type
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 abilitiesroot_finding_alg
PersonParameters.MLE Type
struct MLE{T<:Roots.AbstractSecantMethod} <: PersonParameterAlgorithm
Maximum likelihood estimation for person parameters of item response models.
PersonParameters.PersonParameter Type
struct PersonParameter{U<:Real}
A container holding a single estimated person parameter.
Fields
value
: the estimated ability valuese
: the estimated standard error
Methods
PersonParameters.PersonParameterAlgorithm Type
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:
PersonParameters.PersonParameterResult Type
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 parametersalgorithm
: The algorithm used for estimation
Methods
PersonParameters.ResponsePatterns Type
struct ResponsePatterns{T<:(AbstractVector)}
A struct holding unique response patterns of a data matrix.
PersonParameters.WLE Type
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
Functions
PersonParameters.algorithm Method
algorithm(pp)
Get the algorithm used to calculate the person parameters in pp
.
Examples
julia> pp = person_parameters(OnePL, fill(zeros(3), 5), zeros(3), MLE());
julia> algorithm(pp)
MLE{Roots.Secant}(Roots.Secant())
PersonParameters.modeltype Method
modeltype(pp)
Get the scaling model used to calculate the person parameters in pp
.
Examples
julia> pp = person_parameters(TwoPL, fill(zeros(3), 10), fill((a = 1.0, b = 0.0), 3), WLE());
julia> modeltype(pp)
TwoParameterLogisticModel
PersonParameters.person_parameter Method
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> 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> 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)
PersonParameters.person_parameters Method
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> 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());
PersonParameters.se Method
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
).
PersonParameters.se Method
se(pp)
Extract the standard error from a PersonParameter
estimate pp
.
Examples
julia> pp = PersonParameter(0.5, 0.3);
julia> se(pp)
0.3
PersonParameters.value Method
value(pp)
Extract the value from a PersonParameter
estimate pp
.
Examples
julia> pp = PersonParameter(0.0, 1.0);
julia> value(pp)
0.0