SCM

[#6759] Bug in eRm::LRtest

Date:
2022-02-14 19:55
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:
minor
Resolution:
Awaiting Response
URL:
Summary:
Bug in eRm::LRtest

Detailed description
According to the documentation, a character vector can be supplied as a split criterion. However, then the element spl.gr of the output object is broken.

# MWE:

library(eRm)

dat = matrix(sample(0:3,1000,TRUE),200,5)
mod = PCM(dat)
grp = rep(c("a","b","c","d"),each=50) # character vector
tst = LRtest(mod,splitcr=grp)

tst$spl.gr # ???

# However, it works if we use a factor (thanks to Marco J. Maier for the hint)

grp = factor(rep(c("a","b","c","d"),each=50)) # must be a factor!
tst = LRtest(mod,splitcr=grp)

tst$spl.gr # :-)

[1] "grp a" "grp b" "grp c" "grp d"

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