Re: [R] Factor Analysis/Inputting Correlation Matrix

2011-11-20 Thread biorafas
ey man!!

you need to change the format of your data as matrix


data - as.matrix(correlation_data) 

solucion - factanal(covmat = data, factors=2)

that´s all!!!

enjoy

Rafael Ch.

--
View this message in context: 
http://r.789695.n4.nabble.com/Factor-Analysis-Inputting-Correlation-Matrix-tp3591163p4090012.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Factor Analysis/Inputting Correlation Matrix

2011-06-11 Thread Joshua Wiley
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 mattst...@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@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/

__
R-help@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.