Closed maxheld83 closed 9 years ago
above commit does not actually solve this problem, just avoids it in testing -> suboptimal
Ok, it seems to me that we must really solve this problem at a somewhat fundamental level (see suggestions below).
Here's what happens:
psych
– by default – reorders (Here's why that matters:
qmethod
, though this (undocumented?) behavior may be pretty confusing to users (or then again, maybe not, because rotated components are quite different anyway).q.mrot.do
, because that function also applies (manually provided) rotation matrices, but does not re-order factors (see below for why that doesn't work).qmethod(rotation=varimax
) does reorder, and the other q.mrot.do
does not.
That can lead to a lot of confusion.q.mrot.choose
can happily do that, and so can q.mrot.do
q.mrot.choose
is multiplied to the original rotation matrix already in results$brief$rotmat
.
q.mrot.choose
was created using a reordered loadings matrix, so the angles for 1st, 2nd etc. factor are all out of whackq.mrot.do
does not reorder, so you get different resultsThere are, in principle (principal) (haha), 2 ways out of this:
qmethod()
(preferably psych::principal
) not to reorder, at least optionally, and only accept those results as inputs to q.mrot.choose
and q.mrot.do
.q.mrot.do
to do the same kind of reordering.I'm in favor of 1.
, because:
q.mrot.do
, which is called by q.mrot.choose
would be a UX disaster: while manually rotating, axes would jump around (because order is changed), and plots would be 90° rotated or completely changed.
ok, so, if no one has a better idea :smile_cat: I'll go for reverse-engineering the ordering in #273 to fix this issue, until/unless psych::principal
makes it optional as per #274
this is a weird bug that came up in testing (luckily).
psych::principal
apparently changes the order of factors in the output upon (automatic) rotation in some cases, as per http://stackoverflow.com/questions/32349235/cannot-reproduce-varimax-rotation-from-psych-order-of-factors-is-changedThis at least causes problems in testing (when testing
q.mrot.do
againstpsych::principal
), but I am afraid it might cause problems elsewhere, too.Need to get to the bottom of this.