# STAT 401 exam scores Fall 07 Y=matrix(c( 85, 74, 92, 161, 99, 92, 92, 161, 79, 54, 70, 136, 88, 84, 88, 176, 63, 62, 85, 168, 107, 74, 91, 168, 102, 87, 89, 163, 93, 69, 89, 147, 97, 67, 85, 166, 78, 74, 85, 181, 89, 78, 85, 167, 82, 57, 87, 155, 78, 58, 80, 123, 86, 67, 90, 165, 97, 76, 79, 160, 87, 79, 91, 155, 83, 76, 79, 176),ncol=4,byrow=T) W=matrix(c(1, 0, 0, 0, .5, 0, 0, .5, 0, 0, 0, .5),ncol=3,byrow=T) X=Y %*% W clab=c("Exam 1","Exam 2","Exam 3") postscript("eps_files/scatterplot_matrix.eps", horizontal=F,onefile=F,width=6,height=5) oldpar=par(cex=1.4,mex=1.2) pairs(X,labels=clab,pch = 21, main="STAT 401 Exam Scores") par(oldpar) dev.off() # STAT 537 Demographic Data Spring 08 X=matrix(c( 18, 1, 6, 72, 199, 08, 0, 4, 63, 334, 20, 1, 5, 68, 058, 16, 0, 5, 66, 267, 17, 0, 6, 64, 166, 12, 0, 4, 62, 253, 14, 1, 7, 70, 200),ncol=5, byrow=T) library(TeachingDemos) colnames(X) = c("Name","Gender","Family","Height","Birthday") student.names=c("Shaun","Yin","Mickael","Kezia","Glenna","Torunn","Robert") postscript("eps_files/faces_08.eps", horizontal=F,onefile=F,width=6,height=5) oldpar=par(cex=1.4,mex=1.2) faces2(X,main="537 Profiles",labels=student.names,scale="columns", which=c(8,12,9,4,14)) par(oldpar) dev.off() # Face Parameters: # Length of Name: Curvature of mouth # Gender: Angle of eyes/eyebrows # Family Size: Width of mouth # Height: Width of top half of face # Birthday: Size of Eyes