[R-sig-ME] Multi-level Rasch Model Per Douglas Bates' paper
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Wed May 13 18:41:44 CEST 2020
If you change that last line to lme4::glmer() it works fine.
In the early days lmer() specified with a family argument would
automatically convert (internally) to a glmer call, but we shut that off
in a recent release.
On 5/13/20 12:35 PM, Rasmus Liland wrote:
> On 2020-05-13 17:28 +0200, Phillip Alday wrote:
>> On 13/5/20 5:07 pm, Simon Harmel wrote:
>>> Hi All!
>>> I'm following this paper
>>> https://www.jstatsoft.org/article/view/v020i02
>>> by Prof. Bates where after fitting the
>>> model (*pp. 14-15*), they obtain what
>>> they call *item easiness* *"from the
>>> estimates of the fixed effects and the
>>> conditional modes of the random
>>> effects."*
> Dear Simon,
>
> I was not even able to get past subsection 3.2 ...
> how reproducible even are the examples in
> this text?
>
> Best,
> Rasmus
>
> data("lq2002", package="multilevel")
> wrk <- lq2002
> # wrk[1:5,]
> 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))
> # str(lql)
> # summary(lql)
>
> ## 3.2 Fitting an initial multilevel Rasch model
> (fm1 <- lme4::lmer(
> dichot ~ 0 + itype + (1 | subj) + (1 | COMPID) + (1 | item),
> lql,
> binomial))
> Error in mkRespMod(fr, REML = REMLpass) : response must be numeric
> Calls: <Anonymous> -> do.call -> <Anonymous> -> mkRespMod
> Execution halted
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list