psych (version 1.0-42)

factor.rotate: ``Hand" rotate a factor loading matrix

Description

Given a factor or components matrix, it is sometimes useful to do arbitrary rotations of particular pairs of variables. This supplements the much more powerful rotation package GPArotation and is meant for specific requirements to do unusual rotations.

Usage

factor.rotate(f, angle, col1=1, col2=2)

Arguments

f
original loading matrix or a data frame (can be output from a factor analysis function
angle
angle (in degrees!) to rotate
col1
column in factor matrix defining the first variable
col2
column in factor matrix defining the second variable

Value

  • the resulting rotated matrix of loadings.

Details

Partly meant as a demonstration of how rotation works, factor.rotate is useful for those cases that require specific rotations that are not available in more advanced packages such as GPArotation.

References

http://personality-project.org/revelle/syllabi/405.syllabus.html

Examples

Run this code
#using the Harman 24 mental tests, rotate the 2nd and 3rd factors 45 degrees
pc <- principal(Harman74.cor$cov,4,rotate=TRUE)
pcr45 <- factor.rotate(pc,45,2,3)
pcr90 <- factor.rotate(pcr45,45,2,3)
print(factor.congruence(pc,pcr45),digits=3) #poor congruence with original
print(factor.congruence(pc,pcr90),digits=3) #factor 2 and 3 have been exchanged and 3 flipped

Run the code above in your browser using DataLab