Re: [R] R and S-Plus got the different results of principal component analysis from SAS, why?

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Tue 30 Jan 2007 - 14:47:26 GMT

zhijie zhang wrote:
> Dear Rusers,
>
> I have met a difficult problem on explaining the differences of principal
> component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't
> met before.
>
> Althought they have got the same eigenvalues, their coeffiecients were
> different.
>
> First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show
> the original dataset, hoping sb. to try and explain it.
>
> SAS,STATA,and SPSS have the same results, so i put them together. From
> their results, we see that the absolute values of coeffiecient are same, but
> PC1,PC2,PC4,PC5 and PC6 in R have the opposite sign on the coeffiecnts
> contrast with SAS, and PC4,PC5 in S-PLUS have the opposite sign on the
> coeffiecnts contrast with SAS. Curiously, I got the same results amont all
> these software using my another dataset.
>
> *
Principal components are only *defined* up to sign changes (as the help page for prcomp says quite explicitly!!!!)

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@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
and provide commented, minimal, self-contained, reproducible code.
Received on Wed Jan 31 02:14:19 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 30 Jan 2007 - 15:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.