如何在带有两个参数的IRT模型中修复项目的歧视 根据TAM文档,必须为项目参数提供矩阵(难度和歧视) B.将一个可选矩阵固定,该矩阵带有四个用于固定矩阵的列 条目在...

问题描述 投票:0回答:1

B.FIXED可选矩阵,带有四个用于固定矩阵的列 2PL估计中的条目。第一列:项目索引,第二列: 类别,第三列:维度,第四列:固定值。

使用以下代码使用正确的语法?

# Example data n_cand <- 10 n_items <- 3 data <- matrix(sample(0:1, n_cand * n_items, replace = TRUE), nrow = n_cand, ncol = n_items) # Define fixed item difficulties and discriminations xsi.fixed <- cbind(1:n_items, diff = c(-1, 0, 1.2)) # arbitrary values b.fixed <- cbind(1:n_items, category = 0, dimension = 1, discr = c(1, 1.2, 0.9)) # Example values # Fit the 2PL model mod <- tam.mml.2pl(resp = data, xsi.fixed = xsi.fixed, B.fixed = b.fixed)

需要为任何项目的每个类别进行修复加载,而
category

列是以1。1的计数器。类别列不能为

0
.
r
1个回答
0
投票

n_cand <- 10 n_items <- 3 data <- matrix(sample(0:1, n_cand * n_items, replace = TRUE), nrow = n_cand, ncol = n_items) # Define fixed item difficulties and discriminations xsi.fixed <- cbind(1:n_items, diff = c(-1, 0, 1.2)) # arbitrary values b.fixed <- rbind( cbind(1:n_items, category = 1, dimension = 1, discr = c(0, 0, 0)), cbind(1:n_items, category = 2, dimension = 1, discr = c(1, 1.2, 0.9))) # Example values # Fit the 2PL model mod <- tam.mml.2pl(resp = data, xsi.fixed = xsi.fixed, B.fixed = b.fixed) mod$B

    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.