SCM

[#6808] Bug in eRm::plotICC(...,empICC=list("raw")): Wrong location of points

Date:
2023-05-29 22:05
Priority:
3
State:
Open
Submitted by:
Rainer Alexandrowicz (rwa)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
None
URL:
Summary:
Bug in eRm::plotICC(...,empICC=list("raw")): Wrong location of points

Detailed description
The empirical ICC draws the points representing the relative frequencies shifted by one unit if the data set contains no zero scores. Example:

library(eRm)

x0 = sim.rasch(2000,8)
m0 = RM(x0)
plotICC(m0,empICC=list("raw")) # perfect plot

x1 = x0[rowSums(x0)>0,]
m1 = RM(x1)
plotICC(m1,empICC=list("raw")) # shifted by 1 unit

The bug may be associated with lines 117-118 of plotICC.Rm():

rel.freq <- freq.table[, 2]/rowSums(freq.table)
idx <- as.numeric(rownames(freq.table))

I want to thank Davide Albers for pointing me at the bug.

Comments:

No Comments Have Been Posted

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge