[R] Factor Analysis/Inputting Correlation Matrix

Joshua Wiley jwiley.psych at gmail.com
Sun Jun 12 00:18:19 CEST 2011


Hi Matt,

Did you try reading the documentation for factanal()?  You can pull it
up by typing: help("factanal")

These give basically identical results using the raw data, the
covariance matrix, and the correlation matrix.

factanal(x = mtcars, factors = 3)
factanal(factors = 3, covmat = cov(mtcars))
factanal(factors = 3, covmat = cor(mtcars))

all of which is clearly, explained if you read the details for the
argument "covmat" in the help.

Cheers,

Josh

On Sat, Jun 11, 2011 at 3:06 PM, Matt Stati <mattstati at yahoo.com> wrote:
> Can someone please direct me to how to run a factor analysis in R by first inputting a correlation matrix? Does the function "factanal" allow one to read a correlation matrix instead of data vectors?
>
> Thanks,
> Matt.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list