[R] In factor analysis in the psych package, how can I work out which factors the columns in $scores relate to? How do I know what each of the scores is scoring?

Brent Caldwell brent.caldwell at otago.ac.nz
Sun Dec 9 22:07:47 CET 2012


Dear Professor Carlson
Thank you so much! The $Structure command displays the loadings with the same style of column heading as the $scores (i.e.  [,1]       [,2]        [,3]       [,4]        [,5]       [,6]       [,7]       [,8]         [,9]      [,10]       [,11]), and makes me so much more confident that the columns in the $scores are displayed in the same order as the columns in $loadings, even though $loadings has  different column headings to $scores (the column headings of $loadings are MR4           MR3        MR2          MR6           MR7          MR5           MR1          MR8         MR10          MR9         MR11).
Thank you!
Best wishes
Brent



-----Original Message-----
From: David L Carlson [mailto:dcarlson at tamu.edu] 
Sent: Thursday, 6 December 2012 2:45 p.m.
To: Brent Caldwell; 'r-help at R-project.org'
Cc: 'William R Revelle'
Subject: RE: [R] In factor analysis in the psych package, how can I work out which factors the columns in $scores relate to? How do I know what each of the scores is scoring?

I think you are safe in assuming that the first factor is used to compute the first factor score column. The factor.scores() procedure is used by fa() to compute the factor scores so it provides details regarding how they are computed beyond the information in the fa() help page. As I understand the help file, the default rotation is oblimin so 

"In the oblique case, the factor loadings are referred to as Pattern coefficients and are related to the Structure coefficients by S = P and thus P = S��1. When estimating factor scores, fa and factanal differ in that fa finds the factors from the Structure matrix and factanal seems to find them from the Pattern matrix. Thus, although in the orthogonal case, fa and factanal agree perfectly in their factor score estimates, they do not agree in the case of oblique factors. Setting oblique.scores = FALSE will produce factor score estimate that match those of factanal."

So you might want to look at $Structure.

The $scores part of the output is a matrix without column names (they are just numbered). The V1, V2, . . . is added by the write.csv() function and is not part of the actual output from fa(). 

-------
David

> -----Original Message-----
> From: Brent Caldwell [mailto:brent.caldwell at otago.ac.nz]
> Sent: Wednesday, December 05, 2012 7:08 PM
> To: dcarlson at tamu.edu; 'r-help at R-project.org'
> Cc: William R Revelle (revelle at northwestern.edu)
> Subject: RE: [R] In factor analysis in the psych package, how can I 
> work out which factors the columns in $scores relate to? How do I know 
> what each of the scores is scoring?
> 
> Dear Prof Carlson
> Thank you very much.  As far as I can tell, factor.scores requires an 
> object from class grm, itm, rason, or tpm; which I think are part of 
> the irt package with which I am unfamiliar.
> I had used the psych package to do the following factor analysis:
> fa.11factors.rawdata <- fa(WISDMrawdataframe,nfactors=11) # 
> WISDMrawdataframe has 37 columns and 2408 rows, and contain 1051 rows 
> that are NA (having NA in this dataframe allows the raw data to have 
> the same length as my vector of ID numbers so I can work out which 
> participants the data belong to) fa.11factors.rawdata$loadings #on the 
> computer screen this gives me the
> loadings with column names    MR4    MR3    MR2    MR6    MR7    MR5
> MR1    MR8    MR10   MR9    MR11
> fa.11factors.rawdata$scores # on the computer screen this gives me the
> scores with column names              [,1]       [,2]        [,3]
> [,4]        [,5]       [,6]       [,7]       [,8]         [,9]
> [,10]       [,11]
> Am I safe in assuming that the scores in the first column relate to 
> the loadings in the column called MR4?
> If this is a safe assumption, then I can work out which factor the
> scores relate to, by looking at which items load onto MR4    MR3    MR2
> MR6    MR7    MR5    MR1    MR8    MR10   MR9    MR11
> Thank you, I've taken your advice and cc'd this to Prof William 
> Revelle Thank you Best wishes Brent
> 
> -----Original Message-----
> From: David L Carlson [mailto:dcarlson at tamu.edu]
> Sent: Thursday, 6 December 2012 10:33 a.m.
> To: Brent Caldwell; 'r-help at R-project.org'
> Subject: RE: [R] In factor analysis in the psych package, how can I 
> work out which factors the columns in $scores relate to? How do I know 
> what each of the scores is scoring?
> 
> Without seeing what options you have specified in your call to fa(), 
> it is not possible to answer the question. There are detailed 
> discussions in ?fa and ?factor.scores in the psych package, but for 
> the final word you should probably contact the package maintainer:
> 
> Package: psych
> Version: 1.2.8
> Date: 2012-08-08
> Title: Procedures for Psychological, Psychometric, and Personality
>         Research
> Author: William Revelle <revelle at northwestern.edu>
> Maintainer: William Revelle <revelle at northwestern.edu>
> 
> ----------------------------------------------
> David L Carlson
> Associate Professor of Anthropology
> Texas A&M University
> College Station, TX 77843-4352
> 
> > -----Original Message-----
> > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- 
> > project.org] On Behalf Of Brent Caldwell
> > Sent: Wednesday, December 05, 2012 2:53 PM
> > To: r-help at R-project.org
> > Subject: [R] In factor analysis in the psych package, how can I work 
> > out which factors the columns in $scores relate to? How do I know
> what
> > each of the scores is scoring?
> >
> > Hi
> > I have used fa() to perform a factor analysis of a psychological 
> > battery which is thought to have 11 factors.  I can identify which 
> > factors the loadings relate to easily enough because I can see which 
> > items are loading onto each of the columns in the $loading output.
> > However, how can I identify which items or loadings are being used 
> > to create each of the columns in the $scores output?  I have used 
> > generalised linear models which have shown that some of the scores
> are
> > significant predictors of treatment outcome, but I can't work out 
> > which of the 11 factors they are scoring?
> >
> > when I export to csv the $loadings I get the following columns in
> this
> > order:
> >  MR4, MR3, MR2, MR6, MR7, MR5, MR1, MR8, MR10, MR9, MR11
> >
> > When I export to csv the $scores I get the following columns in this
> > order:
> > V1, V2, V3, V4, V5, V6, V7, V8, V9, V10,V11
> >
> > Are the scores in the column V1 derived from the loadings in column
> > MR1 ?
> > Or are the scores in the first column of $scores (ie V1) derived 
> > from the loadings in the first column of $loadings (ie MR4)?
> >
> > Thank you very much for your guidance, and your patience with my 
> > confusion Best wishes Brent
> >
> >
> > Brent Caldwell, MBChB, DPH, MPH.
> > Research Fellow
> > Department of Medicine
> > University of Otago, Wellington
> > New Zealand
> > U  brent.caldwell at otago.ac.nz
> > b  04 918 6041
> >    021 87 22 64
> >   23a Mein Street, PO Box 7343, Newtown, WELLINGTON 6021, NEW 
> > ZEALAND brent.ower.caldwell
> >   Zonnic study
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting- 
> > guide.html and provide commented, minimal, self-contained, 
> > reproducible code.



More information about the R-help mailing list