scale_epmfd() fits either a parametric graded response model (GRM, via
mirt) or a nonparametric Mokken model (via mokken) to
polytomous item-response data and filters out weak items based on
user-specified thresholds.
scale_epmfd(
object,
method = c("auto", "mirt", "mokken"),
a_thr = 0.5,
H_thr = 0.3
)An object of class epmfd_scaled, a list containing:
raw: the original epmfd_raw object
method: scaling method actually used ("mirt" or
"mokken")
kept: names of items retained
removed: names of items removed
model: fitted GRM model (for "mirt"), else NULL
ai: item parameter estimates (for "mirt")
a_thr: discrimination threshold used (for "mirt")
model_fit: results of mirt::M2() (if available)
Hi: vector of item scalability coefficients (for
"mokken")
H_thr: scalability threshold used (for "mokken")
items: the vector containing all items names.
An epmfd_raw object created by load_epmfd().
Scaling method. One of:
"mirt": fit a one-factor graded response model (GRM).
"mokken": perform nonparametric Mokken scale analysis.
"auto" (default): choose based on sample size
(n >= 500 → GRM, otherwise Mokken).
Numeric. Threshold for item discrimination parameter a
when using GRM (default = 0.5). Items with a < a_thr are
removed.
Numeric. Threshold for item scalability coefficient H_i
when using Mokken analysis (default = 0.3). Items with
H_i < H_thr are removed.
The function converts ordered factors to numeric before analysis.
For GRM (mirt), items are filtered by their discrimination
parameter a. The overall model fit is attempted using
mirt::M2(); if this fails (e.g., due to insufficient df), a warning
is issued and model_fit = NULL.
For Mokken, item scalability coefficients H_i are computed and
compared to H_thr.
load_epmfd(), misfit_epmfd(), plot.epmfd_scaled()
library(epmfd)
data<-load_epmfd(sampledata)
scale_epmfd(data)
Run the code above in your browser using DataLab