An overview of extended Rasch modelling in R with the eRm package.
Prepare data
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(eRm)dat <-readRDS("erm_example.rds")dat <- dat %>%mutate(sum_d =rowSums(across(starts_with("D_"))),sum_a =rowSums(across(starts_with("A_"))) )dat_d <- dat %>%select(starts_with("D_"))dat_a <- dat %>%select(starts_with("A_"))
pp_a <-person.parameter(fit_a)pp_d <-person.parameter(fit_d)dat$pp_d <-coef(pp_d) # add person parameter to raw data framedat$pp_a <-coef(pp_a) # add person parameter to raw data frame
Caution! Raw values of 0 and 15 (upper and lower limit) are between -Inf/+Inf and the upper/lower cut off and are estimated based on the distribution shape.
plot(pp_d, main ="Dekodierungsleistung")
plot(pp_a, main ="Automatisierung")
plotPImap(fit_d)
Test Modelfit
Visual inspection of item discrimination
plotjointICC(fit_d, xlim =c(-5, 5))
plotjointICC(fit_a, xlim =c(-5, 5))
Likelihood ratio tests
LRtests test for the estimation “stability” across several sub-samples of the data set.
A median split allows for checking if the item-difficulty estimations are constant for the lower and upper part of the performance scale. This is similar to a test for homoscedasticity.