04302a3ans

# 04302a3ans - 2004 302 Assignment 3 model answers...

This preview shows pages 1–4. Sign up to view the full content.

2004 302 Assignment 3 model answers sfish=scale(fish) d=dist(sfish,method="manhattan") pco=cmdscale(d,k=(nrow(sfish)-1),eig=T) a) plot(pco\$eig,type="b",xlab="Principal Axis",ylab="Eigenvalue") 0 5 10 15 20 25 0 50 100 150 200 Principal Axis Eigenvalue b) -4 -2 0 2 4 -4 -2 2 4 Principal Axis 1 Principal Axis 2 996 1997 1997 1997 1997 1998 1998 1998 1998 1999 1999 1999 1999 2000 2000 2000 2000 2001 2001 2001 2001 2002 2002 2002 2002 2003 2003

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Code: eqscplot(pco\$points[,1:2],type="n",xlab="Principal Axis 1",ylab="Principal Axis 2") text(pco\$points[,1:2],as.character(data[,1])) c) pco=cmdscale(d,k=2,eig=T) pco\$GOF 55.7% of the absolute(variance) is explained by the first 2 principal axes. d) Could use bubble plots (but I will save trees). Correlations between PAs and variables: Albacore Yellowfin Skipjack Bigeye Sharks P.A.1 -0.438 0.237 0.764 0.709 0.804 P.A.2 -0.682 0.776 -0.205 -0.0436 -0.344 These identify Skipjack, Bigeye and Sharks as positively associated with principal axis 1. Principal axis 2 is a contrast between Albacore and Yellowfin ( Yellowfin positive). 2) Non metric MDS. dim=2 nm=isoMDS(d,k=dim) a) plot(c(14.69801,9.369532 , 6.297604,4.605904,3.409378, 2.749368),type=”b”)
234567 4681 0 1 2 4 Dimension STRESS

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/24/2009 for the course STATS 731 taught by Professor Renate during the Spring '09 term at Auckland.

### Page1 / 4

04302a3ans - 2004 302 Assignment 3 model answers...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online