Re: [R] Dta structure of LOADINGS class in factanal

From: William Revelle <lists_at_revelle.net>
Date: Fri 08 Apr 2005 - 01:30:51 EST

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/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Apr 08 01:38:07 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:03 EST