Obtain model definition for mirt's nominal model taking in account the key of correct answers
Obtain model definition for mirt's nominal model taking in account the key of correct answers
Standard mirt model with itemtype = "nominal" puts the identification constrains on the item response category slopes such as ak0=0 and ak(K−1)=(K−1), freely estimating the rest.
While nominal item responses are unordered by definition, it is often the case that one of the item response categories is correct and the respondents endorsing this category "naturally" possess a higher latent ability. Use this function to obtain model definition where the correct response category kc for item i with K possible response categories translates to constrains akkc=(K−1) and akkd1=0, with kd1 being the first incorrect response category (i.e. the first distractor).
obtain_nrm_def(data_with_key,...)
Arguments
data_with_key: The output of nominal_to_int().
...: arguments passed onto mirt::mirt(). No practical use for now.
Returns
A data.frame with the starting values, parameter numbers, estimation constrains etc. Pass it as pars argument of mirt::mirt().
Examples
library(mirt)# convert nominal data to integers and the original labels with correct answersdata_with_key <- nominal_to_int(HCItest[,1:20], HCIkey)# build model definition for {mirt} using the returned list from abovenrm_def <- obtain_nrm_def(data_with_key)# fit the nominal model using the obtained model definition in `pars` argumentfit <- mirt(data_with_key$Data,1,"nominal", pars = nrm_def)
See Also
Other BLIS/BLIRT related: BlisClass-class, coef,BlisClass-method, fit_blis(), get_orig_levels(), nominal_to_int(), print.blis_coefs()