Multi-level Rasch Model Per Douglas Bates' paper
Dear Phillip, The post you saw was about the "model" itself not the question I have asked here:) Dear Ben, Thank you:) as you know my data is huge and won't fit any plot. I simply want to make sure that "*item easiness estimates*" and "*person ability estimates*" are correctly obtained in the following way for each model given Prof. Bates' paper: r11 <- ranef(m1, condVar = TRUE) # for 'm1' model in my original question in this thread r22 <- ranef(m2, condVar = TRUE) # for 'm2' model in my original question in this thread ### Person abilities and item easinesses for 'm1' person_abilities11 <- r11$cond$person_id$`(Intercept)` item_easiness11 <- r11$cond$item_id$`(Intercept)` ### Person abilities and item easinesses for 'm2' person_abilities22 <- r22$cond$person_id$`(Intercept)` item_easiness22 <- r22$cond$item_id$`(Intercept)`
On Wed, May 13, 2020 at 10:54 AM Ben Bolker <bbolker at gmail.com> wrote:
Yes, this is cross-posted, and I was planning on getting around to showing how to do it in the Cross-Validated post. glmmTMB doesn't have a built-in dotplot method, but you can cheat pretty easily because the individual components of a ranef() extracted from a glmmTMB fit ($cond for conditional model, $zi for zero-inflation model if any) have the same structure as ranef() from lme4, so you can steal the plotting method: library(glmmTMB) example(glmmTMB) library(lme4) r <- ranef(m1) library(lattice) lme4:::dotplot.ranef.mer(r$cond) Note that it's not as easy to get dotplots with whiskers from coef() because of some long-standing (and deep) issues with computing standard deviations for the sum of a fixed and a random effect ... On 5/13/20 11:28 AM, Phillip Alday wrote:
I think I saw this go past on CrossValidated -- you should mention any crossposting. :) In general, it would be nice to know what the structure of your data are. Is "gender" a property of your participants, items, or something else? What about item_type? In lme4, you can extract the item-level predictions with coef(m) (which is the same as ranef(m) + fixef(m)). You can even get a plot of these
with:
library(lattice) dotplot(ranef(m, condVar=TRUE)) The zero-point is the grand mean (i.e. the corresponding fixed effect). I don't know if this is the same as in glmmTMB. Best, Phillip 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."*
In short, I wonder how to obtain item easiness estimates for each of my
models (m1 & m2) below? *Thank you, Simon*
library(glmmTMB)
dat <- read.csv('https://raw.githubusercontent.com/ilzl/i/master/d.csv
')
form11 <- y ~ item_type + (1 | item_id) + (1 | person_id)
form22 <- y ~ item_type + gender + (1 | item_id) + (1 | person_id)
m1 <- glmmTMB(form11, data = subset(dat, person_id <= 40),
family = beta_family())
m2 <- glmmTMB(form22, data = subset(dat, person_id <= 40),
family = beta_family())
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models