JointAbilityScoreDist: Create joint distribution of true scores (i.e., theta) and...

JointAbilityScoreDistR Documentation

Create joint distribution of true scores (i.e., theta) and observed scores

Description

Calculate the probability of each combination of true and observed scores. Note that, since we are dealing with unidimensional models, there is a one-to-one correspondence between ability values and true scores.

Usage

JointAbilityScoreDist(mirtobj, which.items = NULL, theta.mean.sd = NULL)

Arguments

mirtobj

An estimated IRT model (of class SingleGroupClass) estimated either using mirt or unimirt. Must be fitted using the (default) "EM" method. Must be unidimensional.

which.items

A vector of denoting which items should be included in calculating the total raw score. (All items included by default).

theta.mean.sd

An optional 2-value vector giving a mean and standard deviation (SD) of ability. If supplied, this will be used to create 200 quadrature points relevant to the defined mean and SD. These will be used instead of the quadrature points in the original IRT model.

Details

As well as the joint distribution, the output also provides the marginal distribution of true scores and raw scores derived from on the IRT model. Marginal distributions of true scores are purely based on the weights provided for each quadrature point in model fitting.

Conditional distributions of true scores (i.e., the quadrature points) based on raw scores and raw score based on true scores are also provided

Value

The function returns a data.frame with the following columns

theta

Value of abilit

true_score

True score associated with value of ability

raw_score

Raw (observed) score

p

Joint probability of true score (or theta) and raw observed score occuring together

p_theta

Marginal distribution of theta (will be duplicated for every occurrence of same theta in data)

p_raw

Marginal distribution of raw scores (will be duplicated for every occurrence of same raw score in data)

p_raw_given_theta

Conditional distribution of raw score given theta

p_theta_given_raw

Conditional distribution of theta given raw score

e_true

Expected value of true score given raw score

Examples

## Not run: 
#library(unimirt)
mirtRasch=unimirt(mathsdata,"Rasch")
jdist=JointAbilityScoreDist(mirtRasch)
head(jdist)
plot(jdist$raw_score,jdist$p_raw)
plot(jdist$true_score,jdist$p_theta)
plot(jdist$theta,jdist$true_score)
plot(jdist$raw_score,jdist$e_true)+xlim(0,NA)+ylim(0,NA)+geom_abline()

## End(Not run)

CambridgeAssessmentResearch/unimirt documentation built on June 10, 2025, 6:03 a.m.