Detailed description |
I have a data set, for which the sum0-option seems to have no effect (attached below). However, using the data set provided in the package, everything works fine:
# Here the example data set:
library(eRm)
data(pcmdat2) # from package
rsm1 = RSM(pcmdat2,sum0=TRUE)
rsm2 = RSM(pcmdat2,sum0=FALSE)
plotPImap(rsm1) # ok
plotPImap(rsm2)
# Now the problem:
pcm_data = read.csv("pcm_data.csv", header=TRUE, sep=";")[,-1]
rsm1 = RSM(pcm_data,sum0=TRUE)
rsm2 = RSM(pcm_data,sum0=FALSE)
plotPImap(rsm1) # ???
plotPImap(rsm2)
Taking a closer look at the x-axis, we find in both diagrams the identical values. This contradicts the intended effect of the sum0-option. There might be a problem with the W matrix of this data set, etas 4-7 are not sum0-normed (thanks to MJM for this hint!):
> rsm1$W
eta 1 eta 2 eta 3 eta 4 eta 5 eta 6 eta 7
beta V1.c1 -1 -1 -1 0 0 0 0
beta V1.c2 -2 -2 -2 1 0 0 0
beta V1.c3 -3 -3 -3 0 1 0 0
beta V1.c4 -4 -4 -4 0 0 1 0
beta V1.c5 -5 -5 -5 0 0 0 1
beta V2.c1 1 0 0 0 0 0 0
beta V2.c2 2 0 0 1 0 0 0
beta V2.c3 3 0 0 0 1 0 0
beta V2.c4 4 0 0 0 0 1 0
beta V2.c5 5 0 0 0 0 0 1
beta V3.c1 0 1 0 0 0 0 0
beta V3.c2 0 2 0 1 0 0 0
beta V3.c3 0 3 0 0 1 0 0
beta V3.c4 0 4 0 0 0 1 0
beta V3.c5 0 5 0 0 0 0 1
beta V4.c1 0 0 1 0 0 0 0
beta V4.c2 0 0 2 1 0 0 0
beta V4.c3 0 0 3 0 1 0 0
beta V4.c4 0 0 4 0 0 1 0
beta V4.c5 0 0 5 0 0 0 1
|
|