[R] prcomp compared to SPAD
Christine Serres
serres at valigen.net
Tue Oct 3 13:09:06 CEST 2000
Hi !
I've used the example given in the documentation for the prcomp function
both in R and SPAD to compare the results obtained.
Surprisingly, I do not obtain the same results for the coordinates of
the principal composantes with these two softwares.
using USArrests data I obtain with R :
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2 PC3 PC4
Standard deviation 83.732 14.2124 6.4894 2.48279
Proportion of Variance 0.966 0.0278 0.0058 0.00085
Cumulative Proportion 0.966 0.9933 0.9991 1.00000
And using SPAD (french editor CISIA) :
Ex: sd pv cp
comp1 | 2.4802 | 62.01 | 62.01 |
comp2 | 0.9898 | 24.74 | 86.75 |
comp3 | 0.3566 | 8.91 | 95.66 |
comp4 | 0.1734 | 4.34 | 100.00 |
Am I wrong using R ? Why the results are so different ?
Furthemore could anyone explain me the difference between prcomp and
princomp, since we do not obtain exxactly the same results using these
two functions.
And how to obtain the coordinates of the points on the first composante
using R ?
Many thanks,
Christine
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list