Is there a good package for manual / manual / subjective factor / component rotation?

I am trying to add a function to manually (either on behalf of or purely) rotate the load factor matrix from the principal component analysis to the qmethod

R package. Turn in hand, as in: determines the angle of rotation of any pair. (Yes, that's weird, but makes sense in the Q Methodology .)

So far I'm not looking for an interactive GUI (although that would be really nice), but just a CLI that you click on left

or right

and get updated graphics and finally speak OK

.

The baseline is similar to the previous PQMethod program . enter image description here Here's a short video .

My current approach is to use psych::factor.rotate()

and to program several interactive (as in right

, left

, OK

) CLI interface on top of it with updated graphics.

However, I wonder if someone else hasn't.

I googled off but came up short (couldn't even find a manual rotation procedure other than psych::factor.rotate()

.

Any suggestions?

Ps .: bonus if you have a suggestion how to do this using the interactive GUI.

Pps: anyone enough to add a tag qmethod

to this? I do not have the required points.

+3


source to share


1 answer


I would give a manipulate

try - something in my veins:

library(psych)
library(manipulate)
l <- l_orig <- unclass(loadings(principal(Harman.5, 2, scores=TRUE)))
manipulate( 
  { 
    if(rotateRight) 
      l <<- factor.rotate(l, angle, 1, 2)
    if (rotateLeft)
      l <<- factor.rotate(l, -1*angle, 1, 2)

    plot(l, xlim = c(-1, 1), ylim = c(-1, 1), xlab = 1, ylab = 2); abline(v = 0); abline(h = 0)
  }, 
  angle = slider(1, 90, step=1, initial = 1, label = "Angle"), 
  rotateRight = button(">"),
  rotateLeft = button("<")
)
l; l_orig

      



enter image description here

+1


source







All Articles