티스토리 뷰

GRSM(Graded Rating Scale Model) or also-unknown-as RS-GRM(Rating Scale-Graded Response Model) can be fitted by only a couple of softwares. I implemented the fitting in R package mirt(Chalmers, 2012). You can set itemtype="grsmIRT" for it. The only tricky thing that remains is that mirt automatically adjust the response categories so that the difference between the response categories to be 1. Here's how to prevent mirt from doing that and successfully fit the GRSM(RS-GRM).


GRSM(RS-GRM이라고도 부른다)을 적합할 수 있는 프로그램은 그리 많지 않다. mirt의 itemtype="grsm"은 Muraki(1990)과 약간 다르다. 잠재변수의 다차원성 때문에 절편(intercept)는 경사 모수 밖으로 나와 있다. 그래서 mirt에 itemtype="grsmIRT"로 적합할 수 있도록 만들었다. 사실 약간의 행렬 연산과 미분만으로 간단히 만들었지만, 실제로 직접 프로그램을 짜려고 한다면 얼마나 귀찮겠는가! mirt 저자는 친절하게도 contributor로 올려주었다. 근데 문제는 mirt는 중간에 응답이 없는 범주는 제멋대로 생략해 버리는 기능이 있어서 문제가 생길 수도 있다. 예를 들면 아래의 데이터(R)에서 모든 문항이 반응 범주의 갯수가 5개인데 8번째 문항은 응답범주의 갯수가 4개 뿐이라서 문제가 생길 수 있다. 그럴 때는 다음의 방법을 사용할 수 있다. survey.weights를 활용하여 가중치 0인 응답을 인위적으로 만들어 주는 것이다. mirt는 좋은 패키지이다. 근데 가끔 저자가 자기 맘대로 결과의 형식을 바꿔버려서 호환에 문제가 생기기도 한다. 예를 들어 예전에는 fitMirt@AIC로 AIC를 참조했는데, 요즘에는 fitMirt@Fit$AIC를 해야 한다. 또 다른 문제는 모수에 LBOUND 등으로 제약을 가하면 경우에 따라 최적화를 하기도 전에 종료되는 경우도 있다. 근데 누가 MPLUS로 GRSM 적합하는 법 아는 분? 


categories = unique(R[!is.na(R)])

n.item = ncol(R)

R0 = matrix(categories, nrow=length(categories), ncol=n.item)

fitMirt <- mirt(rbind(R0, R), 1, itemtype="grsmIRT", 

                 survey.weights=c(rep(0,ncat), rep(1,nrow(R)))   )  



You can see the data used for the code above. apply(R, 2, unique) and you can the item 8 has only four response categories.

Chalmers, R. P. (2012). mirt: A multidimensional item response theory package for the R environment. Journal of Statistical Software, 48(6), 1–29.
Muraki, E. (1990). Fitting a polytomous item response model to Likert-type data. Applied Psychological Measurement, 14(1), 59–71.


공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함