![Page 1: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/1.jpg)
A Generalized Linear Mixed Model Approach to Item
Response Modeling
Paul De Boeck Sun-Joo ChoU. Amsterdam Peabody College& K.U.Leuven Vanderbilt U.
Vienna, June 6-10, 2011
![Page 2: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/2.jpg)
course
explanatory item response models
softwarelmer function lme4
![Page 3: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/3.jpg)
1. Rijmen, F., Tuerlinckx, F., De Boeck, P., & Kuppens, P. (2003). A nonlinear mixed model framework for item response theory. Psychological Methods, 8, 185-205.
2. De Boeck, P., & Wilson, M. (Eds.) (2004). Explanatory item response models: A generalized linear and nonlinear approach. New York: Springer.
3. De Boeck, P. et al. (2011). The estimation of item response models with the lmer function from the lme4 package in R. Journal of Statistical Software.
Website : http://bearcenter.berkeley.edu/EIRM/
![Page 4: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/4.jpg)
![Page 5: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/5.jpg)
• In 1 and 2 mainly SAS NLMIXED• In 3 lmer function from lme4
![Page 6: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/6.jpg)
Modeling data
• A basic principleData are seen as resulting from a true part and an error part.
binaryYpi=1 if Vpi≥0Ypi=0 if Vpi<0Vpi is a real defined on the interval -∞ to + ∞Vpi = ηpi + εpi εpi ~ N(0,1) probit, normal-ogive
εpi ~ logistic(0,3.29) logit, logistic
![Page 7: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/7.jpg)
Logistic models
• Standard logistic instead of standard normalLogistic model – logit modelvs Normal-ogive model – probit model
density general logistic distribution:f(x)=k exp(-kx)/(1+exp(-kx))2
var = π2/3k2
standard logistic: k=1, σ = π/√3 = 1.814 setting σ=1, implies that k=1.814
best approximation from standard normal: k=1.7this is the famous D=1.7 in early IRT formulas
![Page 8: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/8.jpg)
standard (k=1) logistic vsstandard normal
logistic k=1.8vsstandard normal
copied from Savalei, Psychometrika 2006
![Page 9: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/9.jpg)
0 1 1 1 1 0 1 0 0 0 0 0
1 11 11 1
0 1 1 1 1 0 1 0 0 0 0 0
1 01 0
1 0
0 1 1 1 1 0 1 0 0 0 0 0
0 00 00 0
moving hat modelVpi= ηpi + εpi
ηpi = Σkβk(r)Xpik
V
error distribution
Y = 0 1
binary data
η
![Page 10: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/10.jpg)
0 1 1 1 1 0 1 0 0 0 0 0
1 11 11 1
0 1 1 1 1 0 1 0 0 0 0 0
1 01 0
1 0
0 1 1 1 1 0 1 0 0 0 0 0
0 00 00 0
V
error distribution
Y = 0 1
η
![Page 11: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/11.jpg)
0 1 1 1 1 0 1 0 0 0 0 0
1 11 11 1
0 1 1 1 1 0 1 0 0 0 0 0
1 01 0
1 0
0 1 1 1 1 0 1 0 0 0 0 0
0 00 00 0
V
error distribution
Y = 0 1
η
![Page 12: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/12.jpg)
0 1 1 1 1 0 1 0 0 0 0 0
1 11 11 1
0 1 1 1 1 0 1 0 0 0 0 0
1 01 0
1 0
0 1 1 1 1 0 1 0 0 0 0 0
0 00 00 0
V
error distribution
Y = 0 1
η
![Page 13: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/13.jpg)
ηpiYpi
dichotomization
X1, X2, ..
εpi
linear component
Vpi
random component
Ypi πpi ηpi X1, X2, ..
linkfunction
randomcomponent linear component
![Page 14: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/14.jpg)
Ypi πpi ηpi
Model ηpi = Σkβk(r)Xpik
Distributionrandom component
Linkfunction
Linearcomponent
Logit and probit models
logitprobit
B
![Page 15: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/15.jpg)
Long form
• Wide form is P x I array
• Long form is vector with length PxI
111001000000101010001100101101011000110101100
itemspersons11100100..
pairs (person, item)
covariatesYpi
![Page 16: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/16.jpg)
Long form
• Wide form is P x I array
• Long form is vector with length PxI
111001000000101010001100101101011000110101100
itemspersons11100100..
pairs (person, item)
covariatesYpi
![Page 17: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/17.jpg)
Content
1. Item covariate models2. Person covariate models3. Person x item covariate models4. Random item models
Models for ordered-category data5. Estimation and testing
![Page 18: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/18.jpg)
1. Item covariate models
Vienna, June 6-10 2011
![Page 19: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/19.jpg)
• open R console• setwd(“ ”)• library(lme4)
![Page 20: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/20.jpg)
Data
?VerbAgg
24 items with a 2 x 2 x 3 design- situ: other vs self
two frustrating situations where another person is to be blamedtwo frustrating situations where one is self to be blamed
- mode: want vs do wanting to be verbally agressive vs doing
- btype: cursing, scolding, shoutingthree kinds of being verbally agressive
e.g., “A bus fails to stop. I would want to curse” yes perhaps no316 respondents- Gender: F (men) vs M (women)- Anger: the subject's Trait Anger score as measured on the State-Trait
Anger Expression Inventory (STAXI)
str(VerbAgg) head(VerbAgg)
![Page 21: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/21.jpg)
Y
1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
β1β2β3β4
θp
fixed
random
θp ~ N(0, σ2θ)
1. Rasch model1PL model
ηpi = θpXi0 – ΣkβiXik
ηpi = θp – βi
πpi =exp(ηpi)/(1+exp(ηpi))
Note on 2PL: Explain that in 2PL the constant Xi0 is replaced with discrimination parameters
![Page 22: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/22.jpg)
lmer(r2 ~ …… , family=binomial(“logit”), data=VerbAgg)lmer(r2 ~ …… , family=binomial, VerbAgg) logistic model
lmer(r2 ~ …… , family=binomial(“probit”), data=VerbAgg) normal-ogivelmer(r2 ~ …… , family=binomial(“probit”), VerbAgg) probit model
……item + (1 |id), first item is intercept, other item parameters
are differences with firstβ0= β1, β2-β1, β3-β1, ..
or-1 + item + (1 |id) no intercept, only the common item parameters0 + item + (1 |id)
item is item factorid is person factor1 is 1-covariate(a|b) effect of a is random across levels of b
![Page 23: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/23.jpg)
• to avoid correlated error output:
print(modelname, cor=F)
![Page 24: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/24.jpg)
Y
1 1 1 1
1 1 0 0 0 1 0 1
β2β1
θp
θp ~ N(0, σ2θ)
2. LLTM model
ηpi = θpXi0 – ΣkβkXik
ηpi = θp - ΣkβkXik
β0
fixed random
-1+mode+situ+btype+(1|id), family=binomial, VerbAgg
![Page 25: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/25.jpg)
contrasts
treatment sum helmert polydummy effect00 1 0 -1 -1 linear
10 0 1 1 -1 quadratic
01 -1-1 0 2
without intercept always100010001
S-J
![Page 26: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/26.jpg)
• lmer treatment coding with interceptwant other curse 0 0 0 0want other scold 0 0 1 0 want other shout 0 0 0 1want self curse 0 1 0 0want self scold 0 1 1 0want self shout 0 1 0 1do other curse 1 0 0 0do other scold 1 0 1 0do other shout 1 0 0 1do self curse 1 1 0 0do self scold 1 1 1 0do self shout 1 1 0 1
S-J
![Page 27: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/27.jpg)
• lmer treatment coding without interceptwant other curse 0 1 0 0 0want other scold 0 1 0 1 0 want other shout 0 1 0 0 1want self curse 0 1 1 0 0want self scold 0 1 1 1 0want self shout 0 1 1 0 1do other curse 1 0 0 0 0do other scold 1 0 0 1 0do other shout 1 0 0 0 1do self curse 1 0 1 0 0do self scold 1 0 1 1 0do self shout 1 0 1 0 1
S-J
![Page 28: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/28.jpg)
btype modetreatment sum helmert treatment sum helmert
curse 0 0 1 0 -1-1 want 0 1 -1scold 1 0 0 1 1-1 do 1 -1 1shout 0 1 -1-1 0 2
main effects and interactions
mode:btype is for cell means independent of coding
dummy codingmain effects: mode+btype or
C(mode,treatment) + C(btype,treatment) main effects & interaction: mode*btype or
C(mode,treatment) *C(btype,treatment) effect coding
main effects: 1+C(mode,sum)+ C(btype,sum)main effects & interaction: C(mode,sum)*C(btype,sum)
S-J
![Page 29: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/29.jpg)
Y
1 1 1 1
1 1 0 00 0 1 10 1 0 1
β1β2β3
θp εi
θp ~ N(0, σ2θ)
εi ~ N(0, σ2ε)
3. LLTM + error model
remember there are two items per cell ηpi = θp - ΣkβkXik + εi
fixed random
![Page 30: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/30.jpg)
lmer(r2 ~ mode + situ + btype + (1 |id) + (1|item), orlmer(r2 ~ - 1 + mode + situ + btype + (1 |id) + (1|item), family=binomial, data=VerbAgg)
![Page 31: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/31.jpg)
• two types of multidimensional models- random-weight LLTM- multidimensional 1PL
![Page 32: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/32.jpg)
Y
1 1 0 00 0 1 1
βp1βp2
(βp1,βp2) ~ N(0,0,σ2
θ1,σ2θ2,σθ1θ2)
4. Random-weightLLTM
ηpi = ΣkβpkXik - ΣkβkXik
fixed random
β1β2
![Page 33: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/33.jpg)
lmer(r2 ~ mode + situ + btype + (-1 + mode|id), family=binomial, data=VerbAgg)
![Page 34: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/34.jpg)
Y
1 1 0 00 0 1 1
βp1βp2
(βp1,βp2) ~ N(0,0,σ2
θ1,σ2θ2,σθ1θ2)
5. multidimensional1PL model
ηpi = ΣkβpkXik - βi
1 0 0 00 1 0 00 0 1 00 0 0 1
β1β2β3β4
Note on factor models, how they differ from IRT modelsNote on rotational positions
![Page 35: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/35.jpg)
variance partitioning
error
error
error
error
σ2ε=1 σ2
ε=3.29
σ2ε=1 σ2
ε=3.29
σ2V=1
σ2V=1
![Page 36: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/36.jpg)
• item covariate based multidimensional modelsa non-identified model and four possible identified models
![Page 37: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/37.jpg)
1 0 1 01 0 1 01 0 0 11 0 0 10 1 1 00 1 1 00 1 0 10 1 0 1
1 01 01 01 00 10 10 10 1
1 0 01 0 01 0 11 0 11 1 01 1 01 1 11 1 1
1 -1 + item + (mode + situ|id)2 -1 + item + (-1 + mode + situ|id)3 -1 + item + (-1 + mode |id) + (-1 + situ |id) 4 -1 + item + (mode:situ|id)
1 0 01 0 01 0 11 0 10 1 00 1 00 1 10 1 1
1 01 00 10 11 01 00 10 1
1 0 0 01 0 0 00 1 0 00 1 0 00 0 1 00 0 1 00 0 0 10 0 0 1
1 2 3 4
![Page 38: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/38.jpg)
Illustration of non-identified model
VerbAgg$do=(VerbAgg$mode==“do”)+0VerbAgg$want=(VerbAgg$mode==“want”)+0VerbAgg$self=(VerbAgg$mode==“self”)+0VerbAgg$other=(VerbAgg$mode==“other”)+0mMIR1=lmer(r2~-1+item+
(-1+do+want+self+other|id),family=binomial,VerbAgg)mMIR2=lmer(r2~-1+item+
(-1+want+do+self+other|id),family=binomial,VerbAgg)compare with identified model mMIR3=lmer(r2~-1+item+(-1+mode+situ|id), family=binomial, VerbAgg)
![Page 39: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/39.jpg)
-1 + item + (mode + situ + btype |id)-1 + item + (-1 + mode + situ + btype |id)-1 + item + (-1 + mode |id) + (-1 + situ |id) + (-1 + btype |id)-1 + item + (mode:situ:btype |id)
how many dimensions?
![Page 40: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/40.jpg)
rotations
VerbAgg$do=(VerbAgg$mode==“do”)+0.VerbAgg$want=(VerbAgg$mode==“want”)+0.VerbAgg$dowant=(VerbAgg$mode==“do”)-1/2.
1. simple structure orthogonal(-1+do|id)+(-1+want|id)2. simple structure correlated(-1+mode|id)3. general plus bipolar(1+dowant|id)4. general plus bipolar uncorrelated(1|id)+(-1+dowant|id)
2 and 3 are equivalent1 and 4 are constrained solutionsall four are confirmatory S-J
![Page 41: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/41.jpg)
estimation of person parametersand random effects in general
three methods- ML maximum likelihood – flat prior- MAP mode a posteriori – normal prior, mode of posterior- EAP expected a posteriori – normal prior, mean of
posterior, and is therefore a predictionirtoys does all threelmer does MAPranef(model)se.ranef(model) for standard errors
S-J
![Page 42: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/42.jpg)
Y
1 1 1 1
1 1 0 00 0 1 10 1 0 1
β1β2β3
θp
item fixed randomcovariates persons items
1 0 0 00 1 0 00 0 1 00 0 0 1
βp1βp2βp3
β0 εi
β1β2β3β4
? ?
?
Conflicts?
Extensions?
![Page 43: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/43.jpg)
3. Person-by-item covariate models
Vienna, June 6-10, 2011
![Page 44: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/44.jpg)
i1 i2 i31 1 11 0 10 0 00 0 01 0 11.00 0.50 1.00i1 i2 i31 1 10 1 00 0 00 0 00 1 00.50 1.00 0.50
DIF as discrepancy between within-group structure of differencesbetween-group structure of differences
![Page 45: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/45.jpg)
• covariates of person-item pairs
external covariates
e.g., differential item functioningan item functioning differently depending on the groupperson group x iteme.g., strategy information per pair person-item
internal covariates
responses being depending on other responses
e.g., do responses depending on want responseslocal item dependence – LID;e.g., learning during the test, during the experimentdynamic Rasch model
![Page 46: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/46.jpg)
ωhωh
-1 0 -1 0 -1 0 -1 0 -1 0 -1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 1 0 0 0 1 0 0 0 1
Y
1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
β1β2β3β4
fixed
ηpi = θp – βi + γ + ΣhωhW(p,i)h
γ is group effect
0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 1 0 0 0 1 0 0 0 1 0
ω1
fixed
θp
fixed
random
1. DIF model Differential item functioning
one covariate per DIF parameter
![Page 47: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/47.jpg)
Ypi
θp
group
unfair (because of DIF)
![Page 48: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/48.jpg)
Ypi
θp
group
fair (no DIF)
![Page 49: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/49.jpg)
test score
θp
group
fair (lack of differential test funtioning)
![Page 50: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/50.jpg)
• DIF approaches with lmer1. simultaneous test:- interaction items x groupto identify DIF items, use effect codingto see the item difficulties in the two groups, use Gender:item2. itemwise test- interaction of each item in turn with groupitem1 x group,next item 2 x group,etc.3. random item approach
![Page 51: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/51.jpg)
DIF approaches
difficulties in the two groups – equal mean abilitiesVerbAgg$M=(VerbAgg$Gender==“M”)+0.VerbAgg$F=(VerbAgg$Gender==“F”)+0.-1+Gender:item+(-1+M|id)+(-1+F|id)
simultaneous test all items – equal mean difficulties-1+C(Gender,sum)*C(item,sum)+(-1+M|id)+(-1+F|id) -- difference with reference group-1+Gender*item+(-1+M|id)+(-1+F|id)
itemwise testVerbAgg$i1=(VerbAgg$item==“S1wantcurse”)+0.VerbAgg$i2=(VerbAgg$item==“S1WantScold”)+0. (pay attention to item labels)…e.g., item 3-1+Gender+i1+i2+i4+i5…+i24+Gender*i3+(-1+M|id)+(-1+F|id)
S-J
![Page 52: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/52.jpg)
result depends on equatingtherefore a LR test is recommended
S-J
![Page 53: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/53.jpg)
gender DIF for all do items of the curse and scold type
two different ways to create the covariate
d=rep(0,nrow(VerbAgg))d=[(VerbAgg$Gender==“F”&VerbAgg$mode==“do”&
VerbAgg$btype==“curse”|VerbAgg$btype==“scold”)]=1dif=with(VerbAgg, factor( 0 + ( Gender==“F” & mode==“do” & btype!=“shout”) ) )
-1 +item + Gender + dif + (1|id)
random across persons-1 +item + Gender + dif + (1 + dif|id)
F = manM = woman
dummy coding vs contrast coding (treatment vs sum or helmert) makesa difference for the item parameter estimates
![Page 54: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/54.jpg)
ωhωh
-1 0 -1 0 -1 0 -1 0 -1 0 -1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 1 0 0 0 1 0 0 0 1
Y
1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
β1β2β3β4
fixed
ηpi = θp – βi + ΣhωhW(p,i)h
0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0
ω1
fixed
θp
fixed
random
2. LID model Local item dependence
one covariate perdependency parameter
![Page 55: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/55.jpg)
ωhωh
-1 0 -1 0 -1 0 -1 0 -1 0 -1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 1 0 0 0 1 0 0 0 1
Y
1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
β1β2β3β4
fixed
ηpi = θp – βi + ωwantXi,doYp,i -12
0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0
ωwant
fixed
θp
fixed
random
0 10 01 01 10 01 0
Note on serial dependencyand stationary vs non-stantionary models (making use of random item models)
![Page 56: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/56.jpg)
Ypido resp
θp
Yp,i-12want resp
![Page 57: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/57.jpg)
two different ways to create the covariate
dep=rep(0, nrow(VerbAgg))for(i in 1:nrow(VerbAgg)){if(VerbAgg$mode[i]==“do”) {if(VerbAgg$r2[i-
316*12)==“Y”){dep[i]=1}}}
dep = with(VerbAgg, factor ((mode==“do”)*(r2 [mode==“want”]==“Y”) ) )
-1 + item + dep + (1|id)
random across persons-1 + item + dep + (1+dep|id)
![Page 58: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/58.jpg)
other forms of dependency
which other forms of dependency do you think are meaningful? and how to implement them?
For example:- serial dependency - situational dependency
Y W random effect per situation1 - after defining a new factor (situation)
- 1 11 10 10 00 01 01 1
Remove for two examples
![Page 59: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/59.jpg)
other forms of dependency
which other forms of dependency do you think are meaningful? and how to implement them?
For example:- serial dependency - situational dependency
Y W random effect per situation1 - after defining a new factor (situation)
- 1 11 10 10 00 01 01 1
![Page 60: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/60.jpg)
Y
1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
β1β2β3β4
fixed
ηpi = θp – βi + ωsumW(p,i)sum
0 0 0 1 0 0 1 2 0 0 0 0 0 1 1 1 0 0 1 1 0 1 2 3
ωsum
fixed
θp
fixed
random
3. Dynamic Rasch model
![Page 61: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/61.jpg)
two different ways to create the covariate
prosum=rep(0,nrow(VerbAgg))prosum[which(VerbAgg$r2[1:316]==“Y”)]=1for(i in 317:nrow(VerbAgg))
{if(VerbAgg$r2[i]==“Y”) {prosum[i]=prosum[i-316]+1}{else(prosum[i]=prosum[i-316]}}
long = data.frame(id=VerbAgg$id, item=VerbAgg$item, r2=VerbAgg$r2)wide=reshape(long, timevar=c(“item”), idvar=c(“id”), dir=“wide”)[,-1]==“Y”prosum=as.vector(t(apply(wide,1,cumsum)))
-1 + item + prosum + (1|id)random across persons-1 + item + prosum + (1+prosum|id)
![Page 62: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/62.jpg)
Preparing a new dataset
• Most datasets have a wide formatDataset1 0 0 0 0 0 a0 1 1 0 0 0 b0 1 0 1 0 1 c1 1 1 1 1 0 a1 1 0 0 1 1 b1 1 1 0 0 0 c0 1 1 1 0 0 a1 0 0 0 1 1 bType these data into a file “datawide.txt”
S-J
![Page 63: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/63.jpg)
From wide to long
widedat=read.table(file=“datawide.txt”)widedat$id=paste(“id”, 1:8, sep=“”)
orwidedat$id=paste(“id”,1:nrow(widedata),sep=“”)
library(reshape)long=melt(widedat, id=7:8)names(long)=c(“con”,”id”,”item”,”resp”)
S-J
![Page 64: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/64.jpg)
Change type
from factor to numericlong$connum=as.numeric(factor(long[,1]))
from numeric to factorlong$confac=factor(long[,5])
S-J
![Page 65: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/65.jpg)
4a. Ordered-category data4b. Structural Equation Models
Vienna, June 6-10 2011
![Page 66: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/66.jpg)
a. Ordered-category data
![Page 67: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/67.jpg)
Models for ordered-category datathree types of odds ratios (green vs red)
for example, three categories, two odds ratios
0
0
1
1
0
1
0
0
1
0
0
1
0
1
1
continuation partial gradedratio credit response
1 2 1 2 1 2
P(Y=3)/P(Y=1,2) P(Y=2)/P(Y=1) P(Y=2,3)/P(Y=1)
P(Y=2)/P(Y=1) P(Y=3)/P(Y=2) P(Y=3)/P(Y=1,2)
1
2
3
1
2
3
1
2
3
o d d s r a t i o s
![Page 68: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/68.jpg)
P(Y=3) follows Rasch model P1(θ1)P(Y=2|Y≠3) follows Rasch model P2(θ2)
and is independent of P(Y=3)
P(Y=3) P1(θ1)P(Y=2)=P(Y≠3)P(Y=2|Y≠3) (1-P1(θ1)) x P2(θ2)P(Y=1)=P(Y≠3)P(Y≠2|Y≠3) (1-P1(θ1)) x (1-P2(θ2))
![Page 69: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/69.jpg)
Continuation ratio model is similar to discrete survival model
Choices are like decisive events in time A one indicates that the event occurs, so that later
observations are missingA zero indicates that the event has not yet occured, so that
later observations are possible
![Page 70: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/70.jpg)
Continuation ratio modelchoice tree
1 2 3
0 1
0 10 (3/1&2): 1/(1+exp(θp1-βi1))1 (3/1&2): exp(θp1-βi1)/(1+exp(θp1-βi1))
0 (2/1): 1/(1+exp(θp2-βi2))1 (2/1): exp(θp2-βi2)/(1+exp(θp2-βi2))
3/1&2 2/11: 0 02: 0 13: 1 -
00: 1 / (1+exp(θp1-βi1)+exp(θp2-βi2)+exp(θp1+θp2-βi1-βi2))01: exp(θp2-βi2) / (1+exp(θp1-βi1)+exp(θp2-βi2)+exp(θp1+θp2-βi1-βi2))1- : exp(θp1-βi1) / (1 +exp(θp1 – βi1) )
Order can be reversedif wanted
![Page 71: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/71.jpg)
partial credit modelAn object has a featureif the feature is encounteredon the way to the object
1 2 3
not-f1: exp(0)f1: exp(θp1)exp(βi1)
not-f2: exp(0)f2: exp(θp2)exp(βi2)
f1 f21 0 02 0 13 1 1
00: 1 / (1+exp(θp2-βi2)+exp(θp1+θp2-βi1-βi2))10: exp(θp2-βi2) / (1+exp(θp2-βi2)+exp(θp1+θp2-βi1-βi2))11: exp(θp1-βi1+θp2-βi2) / (1+exp(θp2-βi2)+exp(θp1+θp2-βi1-βi2))
f2
f1
Choice probabilityis value of object divided by sum of values of all objectsvalue of object = product of feature values
![Page 72: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/72.jpg)
extend dataset: replace each item response with two,except when missing:1 002 013 1-
transformation can be done using Tutzcoding function in R.VATutz=Tutzcoding(VerbAgg, “item”, “resp”)
![Page 73: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/73.jpg)
label for recoded responses: tutzsubitems: newitemssubitem factor: category
estimation of common model modelTutz=lmer(tutz~-1+newitem+(1|id),
family=binomial,VATutz)
![Page 74: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/74.jpg)
more Tutz models
rating scale version-1+item+category+(1|id)
gender specific rating scale model-1+C(Gender,sum)*C(category,sum)+item+(1|id)
multidimensional: subitem specific dimensions-1+newitem+(-1+category|id)-1+item+category+(-1+category|id) rating scale version
![Page 75: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/75.jpg)
C B D A11- 10- 0-1 0-0
sem non-sem
ana per
Branching variants
θs - βs
θa - βa θp - βp
![Page 76: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/76.jpg)
fc fic sc sic 11- 10- 0-1 0-0
fast slow
cor cor
Branching variants
fast and slow intelligence θs - βs
θfi - βfi θsi - βsi
![Page 77: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/77.jpg)
b. SEMs
S-J
![Page 78: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/78.jpg)
• 2PL
θ
η1
η2
η3
η4
ε1
ε2
ε3
ε4
![Page 79: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/79.jpg)
-1 + item + (-1+item1|id) + (-1+item2|id) + .. + (1|id)
![Page 80: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/80.jpg)
• Higher-order (Rasch?) models
θg
θ1 θ2
η12 η13 η21 η22 η23η11
1 1
1 1 1 1 1 1
θ’2θ’1
![Page 81: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/81.jpg)
-1 + (1|item) + (-1+want|id) + (-1+do|id) + (1|id)compare with-1 + (1|item) + (-1+mode|id)
![Page 82: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/82.jpg)
• Integrated process SEM
θ1
θ’2 θ’3
θ2 θ3
η11
1 11 1
1 1 1 1 1 1
η12 η21 η22 η31 η32
![Page 83: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/83.jpg)
-1 + item + (1+scoldcurse+curse|id)
shout 1 0 0scold 1 1 0curse 1 1 1
![Page 84: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/84.jpg)
• Mediation process SEM
θ1
θ’2 θ’3
θ2 θ3
η11
1 1? ?
1 1 1 1 1 1
η12 η21 η22 η31 η32
![Page 85: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/85.jpg)
-1 + item + (1+shoutscold|id)+(-1+shoutscold+curse|id) + (-1+curse|id)
shout 1 0 0scold 1 1 0curse 1 1 1
![Page 86: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/86.jpg)
ηpi
β0Xi0 βkXik XiK βK
Zp1 ζ1
Wpi1 ω1
ZpJZpj ζj ζJ
Wpih ωh ωHWpiH
XiKXikXi1 βp/g/i1 βp/g/ik βp/g/iK
Zp1 ζp/g/i1 Zpj ZpJζp/g/ij ζp/g/iJ
… …
… …
… …
.. ..
.. ..
Σ over j
Σ over j
Σ over k
Σ over k
Σ over h
![Page 87: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/87.jpg)
5. Estimation and testing
Vienna, June 6-10 2011
![Page 88: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/88.jpg)
Estimation
• Laplace approximation of integrand
issue: integral is not tractablesolutions1. approximation of integrand, so that it is tractable2. approximation of integral
Gaussian quadrate: non-adaptive or adaptive3. Markov chain Monte Carlo
differences- underestimation of variances using 1- much faster using 1- 1 is not ML, but most recent approaches are close
![Page 89: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/89.jpg)
• approximation of integrand:PQL, PQL2, Laplace6MLwiN: PQL2HLM: Laplace6GLIMMIX: PQLlmer: LaplaceLaplace6>Laplace>PQL2>PQL
• approximation of the integralSAS NLMIXED, gllamm, ltm, and many other
• MCMCWinBUGS, mlirt
![Page 90: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/90.jpg)
Other R-programs
• ltm (Rizopoulos, 2006)1PL, 2PL, 3PL, graded response modelincluded in irtoysGaussian quadrature
• eRm (Mair & Hatzinger, 2007)Rasch, LLTM, partial credit model, rating scale modelconditional maximum likelihood -- CML
• mlirt (Fox, 2007)2PNO binary & polytomous, multilevel
![Page 91: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/91.jpg)
irtoys
calls among other things ltm
Illustration of ltm with irtoys
S-J
![Page 92: A Generalized Linear Mixed Model Approach to Item Response](https://reader030.vdocuments.us/reader030/viewer/2022012423/617793ba87428e619c7d0194/html5/thumbnails/92.jpg)
testing
problems- strictly speaking no ML- testing null hypothesis of zero variance
LR Test does not apply- conservative test- mixture of χ2(r) and χ2(r+1) with mixing prob ½m0=lmer( ..m1=lmer( ..anova(m0,m1)
z-testsAIC, BIC AIC= dev + 2Npar
BIC= dev + log(P)NparS-J