#read in the data #National Track Records for Women: 100, 200, 400, 800, 1500, 3000 m, marathon #in s,s,s,min,min,min,min #Men records are in T8-6.DAT, after 1500 there is 5000, 10,000 and no 3000 m ntrw <- read.table("http://www.rohan.sdsu.edu/~babailey/reut09/T1-9.DAT", row.names=8, header=F) #look at 1st 5 rows of data ntrw[1:5,] #examine correlation matrix cor(ntrw) #PCA Analysis with standardized data (unit variance), center=T is default) pcaw <- prcomp(ntrw, scale=T) summary(pcaw) pcaw #scree plot to determine # of PC's needed plot(pcaw, type="lines") #or screeplot(pcaw, type="lines") #Biplot for helping in interpretation biplot(pcaw) #rank countries based on 1st PC (faster is better?) sort(pcaw$x[,1])