I’m using `brms`

for item response models. I’d like to create item characteristic curves (ICCs) and item information curves (IICs). How can I do that? Item characteristic curves plot the predicted score (y-axis) for each item as a function of trait level (x-axis). Item information curves plot the amount of information (y-axis) for each item as a function of trait level (x-axis). Information is the reciprocal of the standard error of estimation of trait level (Item response theory - Wikipedia). You can see examples of ICCs in section 2.2 and examples of IICs in section 2.3 here: Logistic IRT Models

Here’s a reproducible example of a 2PL IRT model with ordinal data from Paul Burkner’s white paper, that I’d like to create ICCs and IICs for:

```
data("VerbAgg", package = "lme4")
formula_va_ord_2pl <- bf(
resp ~ 1 + (1 |i| item) + (1 | id),
disc ~ 1 + (1 |i| item)
)
# some weakly informative priors
prior_va_ord_2pl <-
prior("constant(1)", class = "sd", group = "id") +
prior("normal(0, 3)", class = "sd", group = "item") +
prior("normal(0, 1)", class = "sd", group = "item", dpar = "disc")
# fit the model
# this models throws some convergence warnings which are false
# positives and can be safely ignored
fit_va_ord_2pl <- brm(
formula = formula_va_ord_2pl,
data = VerbAgg,
family = brmsfamily("cumulative", "logit"),
prior = prior_va_ord_2pl,
seed = 1234,
)
summary(fit_va_ord_2pl)
# extract item and person parameters
(ranef_va_ord_2pl <- ranef(fit_va_ord_2pl))
# plot person parameters
# item easinesses (deviations from thresholds)
eta <- ranef_va_ord_2pl$item[, , "Intercept"] %>%
as_tibble() %>%
rownames_to_column()
# discriminations
alpha <- ranef_va_ord_2pl$item[, , "disc_Intercept"] %>%
exp() %>%
as_tibble() %>%
rownames_to_column()
# put easinesses and discriminations together
bind_rows(eta, alpha, .id = "nlpar") %>%
rename(item = "rowname") %>%
mutate(item = as.numeric(item)) %>%
mutate(nlpar = factor(nlpar, labels = c("Easiness", "Discrimination"))) %>%
ggplot(aes(item, Estimate, ymin = Q2.5, ymax = Q97.5)) +
facet_wrap("nlpar", scales = "free_x") +
geom_pointrange() +
coord_flip() +
labs(x = "Item Number")
```

Thanks in advance!