Multidimensional Scaling of the WISC-IV

This 3-D model can be grabbed and rotated with a mouse. The zoom is controlled with the scroll wheel. Right-button dragging alters the perspective.

If you are unable to rotate the image, try using another browser. I tested it successfully on Firefox, Chrome, and SeaMonkey. I could not rotate the image with Internet Explorer or  Safari.

testglsnapshot
You must enable Javascript to view this page properly.

R code used to generate this image:

# Load rgl package
library(rgl,quietly=TRUE,warn.conflicts=F) # WISC-IV correlation matrix (All Ages)
WISC <- rbind( c(1,0.74,0.62,0.7,0.62,0.5,0.5,0.49,0.45,0.39,0.47,0.28,0.39,0.16,0.56), #SI c(0.74,1,0.68,0.75,0.66,0.51,0.48,0.49,0.42,0.42,0.5,0.31,0.38,0.14,0.59), #VC c(0.62,0.68,1,0.62,0.58,0.44,0.36,0.42,0.4,0.36,0.43,0.3,0.34,0.11,0.52), #CO c(0.7,0.75,0.62,1,0.62,0.5,0.48,0.5,0.4,0.4,0.48,0.31,0.38,0.11,0.62), #IN c(0.62,0.66,0.58,0.62,1,0.47,0.44,0.41,0.41,0.35,0.42,0.25,0.35,0.13,0.48), #WR c(0.5,0.51,0.44,0.5,0.47,1,0.54,0.46,0.39,0.26,0.34,0.29,0.37,0.14,0.41), #PCm c(0.5,0.48,0.36,0.48,0.44,0.54,1,0.55,0.41,0.35,0.38,0.34,0.45,0.19,0.55), #BD c(0.49,0.49,0.42,0.5,0.41,0.46,0.55,1,0.47,0.38,0.42,0.34,0.42,0.14,0.54), #MR c(0.45,0.42,0.4,0.4,0.41,0.39,0.41,0.47,1,0.3,0.36,0.29,0.34,0.14,0.42), #PCn c(0.39,0.42,0.36,0.4,0.35,0.26,0.35,0.38,0.3,1,0.49,0.23,0.3,0.1,0.47), #DS c(0.47,0.5,0.43,0.48,0.42,0.34,0.38,0.42,0.36,0.49,1,0.3,0.4,0.11,0.51), #LN c(0.28,0.31,0.3,0.31,0.25,0.29,0.34,0.34,0.29,0.23,0.3,1,0.53,0.4,0.36), #CD c(0.39,0.38,0.34,0.38,0.35,0.37,0.45,0.42,0.34,0.3,0.4,0.53,1,0.32,0.43), #SS c(0.16,0.14,0.11,0.11,0.13,0.14,0.19,0.14,0.14,0.1,0.11,0.4,0.32,1,0.17), #CA c(0.56,0.59,0.52,0.62,0.48,0.41,0.55,0.54,0.42,0.47,0.51,0.36,0.43,0.17,1)) #AR WISCRows <- c("SI", "VC", "CO", "IN", "WR", "PCm", "BD", "MR", "PCn", "DS", "LN", "CD", "SS", "CA", "AR") colnames(WISC) <- rownames(WISC) <- WISCRows
# Background (which does not usually load properly on the web)
rgl.bg(sphere=T, color=c("gray80","gray70"), lit=T ,back="fill")
# Multidimensional scaling w3<-cmdscale(1-WISC,k=3) #Plot test names text3d(w3,text=WISCRows,col="black") # Make a vector of colors vColor<-c(rep("red",5),rep("orange",2),rep("yellow",2),rep("green",2),rep("blue",3),"purple") # Plot colored spheres spheres3d(w3,radius=0.04,col=vColor,alpha=0.3) # Function to connect lines from sphere edges rather than centers s2s<-function(x){ s<-x[2,]-x[1,] u<-s/sqrt(sum(s*s)) radius<-0.04 rbind(x[1,]+u*radius,x[2,]-u*radius) } # Connect CHC factors with line segments segments3d(s2s(w3[c("CD","SS"),]),col="blue",alpha=0.5) segments3d(s2s(w3[c("CD","CA"),]),col="blue",alpha=0.5) segments3d(s2s(w3[c("LN","DS"),]),col="green",alpha=0.5) segments3d(s2s(w3[c("PCn","MR"),]),col="yellow",alpha=0.5) segments3d(s2s(w3[c("PCm","BD"),]),col="orange",alpha=0.5)