unimirt | R Documentation |
Function to fit a unidimensional IRT model. This function is actually just a wrapper for mirt. The main differences with mirt are a change to the default behaviour for handling missing categories within polytomous items and a slightly more convenient way of fitting a mix of 3 parameter and graded response models for datasets including a mix of dichotomous and polytomous items.
unimirt(data, short.type = "2", augment.data = TRUE, anchor = NULL, ...)
data |
A data frame of item data. |
short.type |
A character string indicating the type of model to fit. "2" (the default) means that a two-parameter graded response IRT model will be used for al items. "1" also leads to a graded response model but with the restriction that all items are constrained to have the same slope. "3" will lead to a 3-parameter IRT model being fitted to all dichotmous items and a graded response model to all polytomous items. "Rasch" will fit a Rasch/Partial Credit Model to all items. "gpcm" will fit the generalised partial credit model to all items. Finally "gpcmfixed" will fit generalised partial credit model but constrain all slope parameters to be equal. This is equivalent to fitting a Rasch model with the constraint being on the variance of the ability distribution rather than fixing all slope parameters to have a value of 1. |
augment.data |
Should missing categories in items be handled by adding cases to the data (default TRUE). Provided the overall data set is reasonably large this should have minimal impact on estimated item parameters. |
anchor |
An optional parameter specifying an estimated IRT model to use to anchor item parameters. This should be an object already estimated either using the function unimirt or by applying the function mirt directly. Any items in the data with names equivalent to items with estimated parameters in this object will have the item parameters fixed at the pre-estimated values. |
... |
Other parameters to be fed to the function mirt. For example including the option "SE=TRUE" will allow standard errors to be calculated. Similarly including (for example) the option 'dentype="Davidian-5"' will allow the model to be estimated with a non-normal ability distribution. |
## Not run:
#two-parameter graded response model
mirt1=unimirt(mathsdata,"2")
coef(mirt1)
MirtTidyCoef(mirt1)
#two-parameter graded response model for polytomous items
#and three-parameter model for dichotmous items
mirt3=unimirt(mathsdata,"3")
coef(mirt3)
MirtTidyCoef(mirt3)
#Rasch/partial credit model
mirtRasch=unimirt(mathsdata,"Rasch")
coef(mirtRasch)
MirtTidyCoef(mirtRasch)
#gpcm
mirtgpcm=unimirt(mathsdata,"gpcm")
coef(mirtgpcm)
MirtTidyCoef(mirtgpcm)
#gpcmfixed
mirtgpcmfixed=unimirt(mathsdata,"gpcmfixed")
coef(mirtgpcmfixed)
MirtTidyCoef(mirtgpcmfixed)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.