JointAbilityScoreDist | R Documentation |
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.
JointAbilityScoreDist(mirtobj, which.items = NULL, theta.mean.sd = NULL)
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. |
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
The function returns a data.frame with the following columns
Value of abilit
True score associated with value of ability
Raw (observed) score
Joint probability of true score (or theta) and raw observed score occuring together
Marginal distribution of theta (will be duplicated for every occurrence of same theta in data)
Marginal distribution of raw scores (will be duplicated for every occurrence of same raw score in data)
Conditional distribution of raw score given theta
Conditional distribution of theta given raw score
Expected value of true score given raw score
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.