<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Principle Component Analysis</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">I have the manual for S+ 6 and I'm trying to use R for the Principle Component Analysis example and I'm getting a few interesting answers...</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The log is as follows:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">R : Copyright 2001, The R Development Core Team</FONT>
<BR><FONT SIZE=2 FACE="Arial">Version 1.3.0 (2001-06-22)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">R is free software and comes with ABSOLUTELY NO WARRANTY.</FONT>
<BR><FONT SIZE=2 FACE="Arial">You are welcome to redistribute it under certain conditions.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Type `license()' or `licence()' for distribution details.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">R is a collaborative project with many contributors.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Type `contributors()' for more information.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Type `demo()' for some demos, `help()' for on-line help, or</FONT>
<BR><FONT SIZE=2 FACE="Arial">`help.start()' for a HTML browser interface to help.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Type `q()' to quit R.</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">> library(mva)</FONT>
<BR><FONT SIZE=2 FACE="Arial">> data <- read.table("h:/test.txt",header=T,sep="")</FONT>
<BR><FONT SIZE=2 FACE="Arial">> data</FONT>
<BR><FONT SIZE=2 FACE="Arial"> diffgeom complex algebra reals statistics</FONT>
<BR><FONT SIZE=2 FACE="Arial">1 36 58 43 36 37</FONT>
<BR><FONT SIZE=2 FACE="Arial">2 62 54 50 46 52</FONT>
<BR><FONT SIZE=2 FACE="Arial">3 31 42 41 40 29</FONT>
<BR><FONT SIZE=2 FACE="Arial">4 76 78 69 66 81</FONT>
<BR><FONT SIZE=2 FACE="Arial">5 46 56 52 56 40</FONT>
<BR><FONT SIZE=2 FACE="Arial">6 12 42 38 38 28</FONT>
<BR><FONT SIZE=2 FACE="Arial">7 39 46 51 54 41</FONT>
<BR><FONT SIZE=2 FACE="Arial">8 30 51 54 52 32</FONT>
<BR><FONT SIZE=2 FACE="Arial">9 22 32 43 28 22</FONT>
<BR><FONT SIZE=2 FACE="Arial">10 9 40 47 30 24</FONT>
<BR><FONT SIZE=2 FACE="Arial">11 32 49 54 37 52</FONT>
<BR><FONT SIZE=2 FACE="Arial">12 40 62 51 40 49</FONT>
<BR><FONT SIZE=2 FACE="Arial">13 64 75 70 66 63</FONT>
<BR><FONT SIZE=2 FACE="Arial">14 36 38 58 62 62</FONT>
<BR><FONT SIZE=2 FACE="Arial">15 24 46 44 55 49</FONT>
<BR><FONT SIZE=2 FACE="Arial">16 50 50 54 52 51</FONT>
<BR><FONT SIZE=2 FACE="Arial">17 42 42 52 38 50</FONT>
<BR><FONT SIZE=2 FACE="Arial">18 2 35 32 22 16</FONT>
<BR><FONT SIZE=2 FACE="Arial">19 56 53 42 40 32</FONT>
<BR><FONT SIZE=2 FACE="Arial">20 59 72 70 66 62</FONT>
<BR><FONT SIZE=2 FACE="Arial">21 28 50 50 42 63</FONT>
<BR><FONT SIZE=2 FACE="Arial">22 19 46 49 40 30</FONT>
<BR><FONT SIZE=2 FACE="Arial">23 36 56 56 54 52</FONT>
<BR><FONT SIZE=2 FACE="Arial">24 54 57 59 62 58</FONT>
<BR><FONT SIZE=2 FACE="Arial">25 14 35 38 29 20</FONT>
<BR><FONT SIZE=2 FACE="Arial">> summary(testscores.prc)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Importance of components:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Comp.1 Comp.2 Comp.3 Comp.4 Comp.5</FONT>
<BR><FONT SIZE=2 FACE="Arial">Standard deviation 28.4896795 9.03547104 6.60095491 6.13358179 3.72335754</FONT>
<BR><FONT SIZE=2 FACE="Arial">Proportion of Variance 0.8212222 0.08260135 0.04408584 0.03806395 0.01402668</FONT>
<BR><FONT SIZE=2 FACE="Arial">Cumulative Proportion 0.8212222 0.90382353 0.94790936 0.98597332 1.00000000</FONT>
<BR><FONT SIZE=2 FACE="Arial">> summary(testscores.prc,loadings=T)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Importance of components:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Comp.1 Comp.2 Comp.3 Comp.4 Comp.5</FONT>
<BR><FONT SIZE=2 FACE="Arial">Standard deviation 28.4896795 9.03547104 6.60095491 6.13358179 3.72335754</FONT>
<BR><FONT SIZE=2 FACE="Arial">Proportion of Variance 0.8212222 0.08260135 0.04408584 0.03806395 0.01402668</FONT>
<BR><FONT SIZE=2 FACE="Arial">Cumulative Proportion 0.8212222 0.90382353 0.94790936 0.98597332 1.00000000</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Loadings:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Comp.1 Comp.2 Comp.3 Comp.4 Comp.5</FONT>
<BR><FONT SIZE=2 FACE="Arial">diffgeom -0.598 -0.675 0.185 0.386 </FONT>
<BR><FONT SIZE=2 FACE="Arial">complex -0.361 -0.245 -0.249 -0.829 -0.247</FONT>
<BR><FONT SIZE=2 FACE="Arial">algebra -0.302 0.214 -0.211 -0.135 0.894</FONT>
<BR><FONT SIZE=2 FACE="Arial">reals -0.389 0.338 -0.700 0.375 -0.321</FONT>
<BR><FONT SIZE=2 FACE="Arial">statistics -0.519 0.570 0.607 -0.179</FONT>
<BR><FONT SIZE=2 FACE="Arial">> print(testscores.prc,loadings=T)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Call:</FONT>
<BR><FONT SIZE=2 FACE="Arial">princomp(x = data)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Standard deviations:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 </FONT>
<BR><FONT SIZE=2 FACE="Arial">28.489680 9.035471 6.600955 6.133582 3.723358 </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> 5 variables and 25 observations.</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">Any thoughts as to what I'm doing wrong??</FONT>
</P>
</BODY>
</HTML>