[R] Princomp$Scores

miguel manese jjonphl at gmail.com
Mon Apr 11 12:13:28 CEST 2005


The scores can be "manually" computed as 

    center(your.matrix,scale=F) %*% eigen(cov(your.matrix))$vector  # or cor()

i.e. a linear combination of your mean-corrected data. negative
coefficients does not imply anything, because computation of the signs
of eigenvectors is arbitrary. Absolute value of
princomp(your.matrix)$load indicates which variable influences a
principal component most (this is closer to the "correlate" thing you
are thinking of, I guess).

On Apr 9, 2005 1:09 AM, Ken Termiso <jerk_alert at hotmail.com> wrote:
> Hi all,
> 
> I was hoping that someone could verify this for me-
> 
> when I run princomp() on a matrix, it is my understanding that the scores
> slot of the output is a measure of how well each row correlates (for lack of
> a better word) with each principal component.
> 
> i.e. say I have a 300x6 log2 scaled matrix, and I run princomp(). I would
> get back a $scores slot that is also 300x6, where each value can be negative
> or positive. I'd assume that the negative values correspond to rows that are
> negatively correlated with that particular PC, and vice-versa for positives.
> 
> Thanks in advance for the help,
> Ken
> 
> ______________________________________________
> R-help at 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
>




More information about the R-help mailing list