中的ConQuest得分命令ConQuest您可以使用命令「score」來使用相同的清單變量/原始數據,但編碼不同的多維/潛在變量建模。例如:在IRT軟件中實施TAM
score (1,2,3) (0,1,2) (0,1,0) ! items(1-3);
「再編碼」 的原始分數爲1至3中0,1和2的第一維度和爲0,1,0爲第二維(潛變量)。
你知道任何方式如何實現在[R包TAM(使用lavaan語法或其他)是否相同?我正在嘗試運行PCM分析。
非常感謝提前!
KH
中的ConQuest得分命令ConQuest您可以使用命令「score」來使用相同的清單變量/原始數據,但編碼不同的多維/潛在變量建模。例如:在IRT軟件中實施TAM
score (1,2,3) (0,1,2) (0,1,0) ! items(1-3);
「再編碼」 的原始分數爲1至3中0,1和2的第一維度和爲0,1,0爲第二維(潛變量)。
你知道任何方式如何實現在[R包TAM(使用lavaan語法或其他)是否相同?我正在嘗試運行PCM分析。
非常感謝提前!
KH
我沒有在這裏得到一個答案,但我接觸亞歷山大Robitzsch,譚包的作者,這裏就是他送我(用他的許可出版):
data(data.gpcm)
psych::describe(data.gpcm)
resp <- data.gpcm
# define three dimensions and different loadings
# of item categories on these dimensions
I <- 3 # 3 items
D <- 3 # 3 dimensions
# define loading matrix B
# 4 categories for each item (0,1,2,3)
B <- array(0 , dim=c(I,4,D))
for (ii in 1:I){
B[ ii , 1:4 , 1 ] <- 0:3
B[ ii , 1 ,2 ] <- 1
B[ ii , 4 ,3 ] <- 1
}
dimnames(B)[[1]] <- colnames(resp)
B[1,,]
## > B[1,,]
## [,1] [,2] [,3]
## [1,] 0 1 0
## [2,] 1 0 0
## [3,] 2 0 0
## [4,] 3 0 1
# test run
mod1 <- tam.mml(resp , B = B , control=list(snodes=1000 , maxiter=5) )
summary(mod1)
當然,我不得不爲自己的需要編輯代碼,但某些特別的東西可能會引起大家的興趣:出於某種原因,如果我還定義了0類別,但B矩陣只能起作用,儘管我的評分/數據僅包括從1到5的值:
B <- array(0 , dim=c(9,6,5)) # 9 items, 5 response cat. + 1, 5 latent dimensions
for (ii in 1:I){
B[ ii , 1:6 , 1 ] <- 0:5
B[ ii , 2 ,2 ] <- 1
B[ ii , 2 ,3 ] <- 1
B[ ii , 6 ,3 ] <- 1
B[ ii , 6 ,4 ] <- 1
B[ ii , 4 ,5 ] <- 1
}
dimnames(B)[[1]] <- colnames(X)
B[1,,]
個
乾杯, KH
,正如擴展與TAM
上面的答案,這裏是如何運行與mirt
包相同的代碼,但是使用了廣義部分信用模型,而不是Rasch模型的(Rasch模型需要一個明確的模型參數進行正確的識別)。
library(mirt)
gpcm_mats <- list(B[1,,], B[2,,], B[3,,])
sv <- mirt(resp, 3, itemtype = 'gpcm',
gpcm_mats = gpcm_mats, pars = 'values') #starting values
mod <- mirt(resp, 3, itemtype = 'gpcm', gpcm_mats = gpcm_mats)
coef(mod, simplify=TRUE)
感謝您發佈這個,菲爾。 下面是我用於我的內容建模的目標以及響應樣式尺寸的代碼: '庫(MIRT) 墊< - 列表() 墊[1:9] < - 列表(矩陣(c(0:4,1,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0),5) ) 模型< - mirt.model( 'T = 1-9 ARS = 1-9 ERS = 1-9 DRS = 1-9 MRS = 1-9 COV = * ARS ERS DRS * MRS' ) mirtModel < - mirt(X,model,'gpcm',gpcm_mats = mats,method =「QMCEM」)' – user4507481 2015-03-13 23:00:24
但請注意,gpcm_mats屬性僅在開發版本中實現可以在https://github.com/philchalmers/mirt上找到 – user4507481 2015-03-13 23:01:13