

www.gllamm.org  
How do I fit IRT models for polytomous responses?
IRT models for ordinal items in gllammCumulative logit models, known as graded response models in item response theory, can be fitted exactly as item response models for binary responses by using theologit , oprobit , or ocll (ordinal complementary loglog)
links. The thresh() option can be used to specify different thresholds
for different items. The partial credit and rating scale models use an adjacent category logit
parameterization that can be implemented via the mlogit
link (see Zheng and RabeHesketh, 2007).
Finally, a continuation ratio model
can be fitted by expanding the data appropriately and fitting a binary logistic regression model.
Partial credit model (PCM)
The partial credict model is a model for polytomous items with ordered respone categories.
For the PCM, we estimate step parameters for category j for item i.
To fit the PCM, the data must be expanded so that each original response
(j = 0, ... ,m_{i}) is
represented by m_{i}+1 rows in the expanded dataset.
Specifically, first create a new variable,
gen obs =_nSuppose that there are five items and each item has 4 categories coded 0, 1, 2, and 3. Now generate variable x to contain all possible scores (0,1,2,3)
for each itemperson combination.
expand 4 by obs, sort: generate x = _n  1 generate chosen = y == xThen generate the variables corresponding to the design matrix for the PCM as forvalues i=1/5 { forvalues g=1/3 { gen d`i'_`g' = 1*item`i'*(x<=`g') } }Now we are ready to fit the PCM. The syntax for the PCM can be written as eq slope: x gllamm x d1_1d5_3, i(pid) eqs(slope) link(mlogit) expand(obs chosen o) /// noconstant adaptIn the first line, eq defines an equation corresponding to the columns of the design matrix.
This equation is specified using the eqs() option.
The expand() option is used to tell the program that the data have been
expanded to one row for each possible response category.
The variable obs indicates which linear preditors need to be combined
for the denominator of the PCM, and the dichotomous variable chosen
picks out the linear predictor that goes into the numerator.
The multinomial logit link is specified in the mlogit option.
In the output, the coefficient of forvalues i=1/5 { gen x_it`i' = x*item`i' }The syntax to fit the 2PL PCM is eq load: x_it1x_it5 gllamm x d1_1d5_3, i(pid) eqs(load) link(mlogit) expand(obs chosen o) /// noconstant adapt Rating scale model (RSM)The rating scale model is a special case of the PCM. The RSM assumes the differences in the step difficulties for different categories are the same for all items. The design matrix for the RSM has fewer columns than the one for the PCM. Use the same example as for the PCM, consider five items with four categories (from 0 to 3). We first need to generate the columns of the matrix that correspond to the common step parameters. generate step1 = 1*(x>=1) generate step2 = 1*(x>=2) generate step3 = 1*(x>=3)The columns for the item scale parameters are generated as foreach var of varlist item* { generate n`var' = 1*`var'*x }The syntax to fit the RSM is eq slope: x gllamm x nit1nit5 step2 step3, i(pid) eqs(load) link(mlogit) /// expand(obs chosen o) nocons adaptThe 2PL RSM has the same design matrix as the 2PL PCM. The syntax for the 2pl RCM is eq slope: x_it1x_it5 gllamm x nit1nit5 step2 step3, i(pid) eqs(load) link(mlogit) /// expand(obs chosen o) adapt noconsIn the RSM output, the coefficient of nit i is
the estimated step parameter for the first step of item i.
The coefficient for step j is the estimated additional
difficulty for the step from j1 to j
where the step parameter for the first category is constrained to 0 for all items.
Examples
References


