[R] Dta structure of LOADINGS class in factanal

William Revelle lists at revelle.net
Thu Apr 7 17:30:51 CEST 2005


At 9:44 AM -0400 4/7/05, Tamas Gal wrote:
>Hi R users,
>I need some help in the followings:
>I'm doing factor analysis and I need to extract the loading values and
>the Proportion Var and Cumulative Var values one by one.
>Here is what I am doing:
>
>>fact <- factanal(na.omit(gnome_freq_r2),factors=5);
>>fact$loadings
>
>
>Loadings:
>           Factor1 Factor2 Factor3 Factor4 Factor5
>b1freqr2  0.246   0.486           0.145
>...
>b9freqr2  0.148   0.449           0.103   0.327
>
>                  Factor1 Factor2 Factor3 Factor4 Factor5
>SS loadings      1.294   1.268   1.008   0.927   0.730
>Proportion Var   0.144   0.141   0.112   0.103   0.081
>Cumulative Var   0.144   0.285   0.397   0.500   0.581
>
>
>I can get the loadings using:
>
>>fact$loadings[1,1]
>
>[1] 0.2459635
>
>but I couldn't find the way to do the same with the Proportion Var and
>Cumulative Var values.


Although not pretty, try

colSums(fact$loading*fact$loading)/dim(fact$loading)[1]       for the 
proportion Var and
cumsum(colSums(fact$loading*fact$loading)/dim(fact$loading)[1])   to 
get the cumulative Var values

Bill


-- 
William Revelle		http://pmc.psych.northwestern.edu/revelle.html   
Professor			http://personality-project.org/personality.html
Department of Psychology       http://www.wcas.northwestern.edu/psych/
Northwestern University	http://www.northwestern.edu/




More information about the R-help mailing list