Re: [R] prcomp(): How do I multiply two matrices

2016-10-07 Thread peter dalgaard
You need to check your theory, and the dimensions of your data structures. Typically, data is (n x p) and your rotation matrix is (p x p) so pre-multiplying by coef1 fits like a round peg in a square hole. Post-multiplying has a better chance, but I have long forgotten whether you need to tran

[R] prcomp(): How do I multiply two matrices

2016-10-07 Thread T.Riedle
Dear R-users, I am trying to do a principal components analysis using the attached data. My code looks as follows. I want to calculate the time series of the principal components (PC) . To this end, I transform the coefficients and the data into matrices and employ a matrix multiplication but i