Library: | stats |
See also: | factoranalysis varimax |
Quantlet: | factorrot | |
Description: | performs a rotation of factors from factor analysis |
Usage: | rotated = factorrot(loadings{,labels}) | |
Input: | ||
loadings | p x k matrix which contains the factor loadings in columns | |
labels | optional p x 1 string vector containing labels of p variables, default: numbers of order of the variables | |
Output: | ||
rotated | p x k matrix of last rotated loadings |
library("nummath") library("graphic") ; load graphic library library("xplore") ; load xplore library library("stats") y=read("food") ; read data y=y[,2:cols(y)] a=factoranalysis(y,4,"PFM") library("plot") labels="bread"|"vegies"|"fruit"|"meat"|"poultry"|"milk"|"wine" c=factorrot(a.loadings,labels)
A plot showing a scatterplot matrix of pairs of factors with a possibility of rotation.