楼主: Lisrelchen
1786 1

Estimating the Multilevel Rasch Model: With the lme4 Package [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4194份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50288 个
通用积分
83.6906
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2013-12-10 12:28:38 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Estimating the Multilevel Rasch Model: With the lme4 Package


Traditional Rasch estimation of the item and student parameters via marginal maximum likelihood, joint maximum likelihood or conditional maximum likelihood, assume individuals in clustered settings are uncorrelated and items within a test that share a grouping structure are also uncorrelated. These assumptions are often violated, particularly in educational testing situations, in which students are grouped into classrooms and many test items share a common grouping structure, such as a content strand or a reading passage. Consequently, one possible approach is to explicitly recognize the clustered nature of the data and directly incorporate random effects to account for the various dependencies.  This article demonstrates how the multilevel Rasch model can be estimated using the functions in R for mixed-effects models with crossed or partially crossed random effects. We demonstrate how to model the following hierarchical data structures: a) individuals clustered in similar settings (e.g., classrooms, schools), b) items nested within a particular group (such as a content strand or a reading passage), and c) how to estimate a teacher x content strand interaction.
v20i02.pdf (553.25 KB, 需要: 1 个论坛币)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Multilevel Estimating package model Level structure settings testing within share

沙发
Lisrelchen(未真实交易用户) 发表于 2013-12-10 12:33:42
###################################################
### chunk number 1: preliminaries
###################################################
library("lme4")


###################################################
### chunk number 2: conversion
###################################################
data("lq2002", package = "multilevel")
wrk <- lq2002
for (i in 3:16) wrk[[i]] <- ordered(wrk[[i]])
for (i in 17:21) wrk[[i]] <- ordered(5 - wrk[[i]])
lql <- reshape(wrk, varying = list(names(lq2002)[3:21]), v.names = "fivelev",
               idvar = "subj", timevar = "item", drop = names(lq2002)[c(2,22:27)],
               direction = "long")
lql$itype <- with(lql, factor(ifelse(item < 12, "Leadership",
                                     ifelse(item < 15, "Task Sig.", "Hostility"))))
for (i in c(1,2,4,5)) lql[[i]] <- factor(lql[[i]])
lql$dichot <- factor(ifelse(lql$fivelev < 4, 0, 1))


###################################################
### chunk number 3: conv2
###################################################
attr(lql,"reshapeLong") <- NULL
lnkinv <- binomial()$linkinv


###################################################
### chunk number 4: lqlstr
###################################################
str(lql)
summary(lql)


###################################################
### chunk number 5: fm1
###################################################
(fm1 <- lmer(dichot ~ 0+itype+(1|subj)+(1|COMPID)+(1|item),
             lql, binomial))


###################################################
### chunk number 6: fm1ranef
###################################################
rr <- ranef(fm1, postVar = TRUE)
str(rr$COMPID)
head(rr$COMPID)


###################################################
### chunk number 7: fm1subj
###################################################
qq <- qqmath(rr)
print(qq$subj)


###################################################
### chunk number 8: fm1comp
###################################################
print(qq$COMPID)


###################################################
### chunk number 9: fm1item
###################################################
print(qq$item)


###################################################
### chunk number 10: fm2
###################################################
fm2 <- lmer(dichot ~ 0 + itype + (1|subj) + (0+itype|COMPID) + (1|item),
            lql, binomial)


###################################################
### chunk number 11: fm2out
###################################################
print(fm2)


###################################################
### chunk number 12: fm3
###################################################
fm3 <- lmer(dichot ~ 0 + itype + (1|subj) + (1|COMPID:itype) + (1|item),
            lql, binomial)
fm3a <- lmer(dichot ~ 0 + itype + (1|subj) + (1|COMPID:itype) + (1|COMPID) + (1|item),
            lql, binomial)


###################################################
### chunk number 13: fm23comp
###################################################
anova(fm3,fm3a,fm2)


###################################################
### chunk number 14: splom
###################################################
rr2 <- ranef(fm2, postVar = TRUE)
print(splom(rr2$COMPID))


###################################################
### chunk number 15: cat2
###################################################
qq2 <- qqmath(rr2)
print(qq2$COMPID)


###################################################
### chunk number 16: iParams
###################################################
str(imap <- unique(lql[, c("itype", "item")]))
(easiness <- ranef(fm2)$item[[1]] + fixef(fm2)[imap$itype])


###################################################
### chunk number 17: compParams
###################################################
compPar <- t(fixef(fm2) + t(ranef(fm2)$COMPID))
head(compPar)


###################################################
### chunk number 18: compprob
###################################################
head(binomial()$linkinv(compPar))

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-11 21:24