Wolfgang,
Since you seem to be doing this in the psych package, it would have been faster
to directly ask the author (me). Luckily, I saw the question on R-Help.
The principal components step is being done on the correlation matrix, not on
the raw data matrix, thus, it is not able to find scores.
However, since you have the components solution, you also the scoring weights.
Taking your analysis:
tetra - tetrachoric (image_na, correct=TRUE)
t_matrix - tetra$rho
pca.tetra - principal(t_matrix, nfactors = 10, n.obs = nrow(image_na),
rotate=varimax, scores=FALSE)
scores - image_na %*% pca.tetra$weights
Bill
On Jan 18, 2012, at 4:27 AM, wolfgang wrote:
Haj
i try to perform a principal component analysis by using a tetrachoric
correlation matrix as data input
tetra - tetrachoric (image_na, correct=TRUE)
t_matrix - tetra$rho
pca.tetra - principal(t_matrix, nfactors = 10, n.obs = nrow(image_na),
rotate=varimax, scores=TRUE)
the problem i have is to compute the individual factor scores from the pca.
the code runs perfect if i do not ask for the scores
if i ask for the scores i get an error message
Error in scale(x.matrix): object 'x.matrix' not found
can somebody help me?
cheers
wolfgang
--
View this message in context:
http://r.789695.n4.nabble.com/computing-scores-from-a-factor-analysis-tp4306234p4306234.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.
William Revellehttp://personality-project.org/revelle.html
Professor http://personality-project.org
Department of Psychology http://www.wcas.northwestern.edu/psych/
Northwestern Universityhttp://www.northwestern.edu/
Use R for psychology http://personality-project.org/r
It is 5 minutes to midnighthttp://www.thebulletin.org
__
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.