Nonmetric Multidimensional Scaling (NMDS)

Download Report

Transcript Nonmetric Multidimensional Scaling (NMDS)

Introduction to multivariate analysis
Zohar Pasternak
Hebrew University of Jerusalem
Multivariate analysis
• An extension to univariate (with a single
variable) and bivariate (with two variables)
analysis
• Dealing with a number of samples and
species/environmental variables
simultaneously
Goals of multivariate analysis
– Summarize the information (data reduction)
– Reveal trends and relationships
– Generate hypotheses about causal relationships
50 sample units X 80 attributes =
FRUSTRATION
The tools of MVA
Class of problem
Appropriate
Inappropriate
(nonlinear model)
(linear model)
Sorensen (a.k.a. Bray- Euclidean distance
curtis) distance
Multivariate
distances between
sites
Exploratory grouping Cluster analysis
Identifying patterns
Testing hypotheses
Non-metric
multidimensional
scaling (NMDS)
ANOSIM, MRPP or
NPMANOVA
Principal
components analysis
(PCA)
One-factor MANOVA
The tools of MVA
PC-ORD, e-primer: pay software
PAST: free software
http://www.nhm.uio.no/norges/past
/download.html
Data analysis workflow
Variables
SU
aa
a
b
bb
c
Similarity
matrix
c
Ordination: NMDS
are clusters different?
aa b
a bb
c
cc
Hypothesis testing:
ANOSIM
Which variables
cause the cluster
difference?
SIMPER
c
MV data usually comes as a matrix
MV data usually comes as a matrix
A
Var1
1.51
1.73
1.20
1.42
1.14
1.39
2.26
1.01
1.09
2.90
3.22
3.42
2.55
2.72
Var2
0.11
0
0
0.05
0
0.07
0.11
0.32
0.09
0
0.03
0.12
0.08
0.13
Var3
0
0
0.02
0
0
0.07
0.03
0.03
0
0.04
0.06
0
0
0
Variables
Var4 Var5
0.35 0.21
0.25 0.23
0.03 0.05
0.99 0.13
0.14 0.17
0
0
0.02
0
0
0
0
0
0.19 0.71
0
0.56
0.38 0.26
0
0.27
0.28 1.11
MaxAge
15
RootDpth 1.73
Fecundity 12
1
0.08
40
9
0.52
66
22
0.25
5
SU-01
SU-02
SU-03
SU-04
SU-05
SU-06
SU-07
SU-08
SU-09
SU-10
SU-11
SU-12
SU-13
SU-14
Var6
0
0
0
0
0
0
0
0
0
0.30
0.41
0
0.43
0
Var7
0
0
0
0.09
0
0
0
0
0
0.15
0
0
0.08
0.11
Var8
0.24
0.53
0.05
0.08
0
0.04
0.07
0.48
0
0.39
0.63
0.06
0.15
0
7
0.35
43
8
2.20
56
5
0.53
52
S
15
0.23
32
E Environmental Variables
Elev Moisture Group
311
9
1
323
17
1
12
10
1
15
8
1
183
12
1
12
26
2
46
29
2
220
19
2
61
22
2
43
34
2
256
21
3
46
17
3
76
22
3
488
36
3
Data adjustments
1.
2.
3.
4.
5.
Calculate descriptive statistics
Delete rare species
Perform monotonic transformation
Perform row or column relativization
Check for outliers
Basic diversity measures
• alpha diversity
• beta diversity
• gamma diversity
Diversity measure
N
alpha
beta
gamma
Site 1
30
12.5
6.6
39
Site 1
26
17.3
3.8
88
…
Transformation
• Two distinct roles:
– To validate statistical assumptions for parametric
analysis (e.g. variance heterogeneity in ANOVA)
– To weight the contributions of common and rare
species in non-parametric multivariate analysis
e.g. square-root transformation
Relativization
• Are variables (=columns) Not all in the same units or on
the same scale? Do you wish to equalize weights given to
variables, e.g. avoid emphasis on dominant variables?
-> relativize by column percentage
• Did sample units (=rows) not have ca. equal area, time or
effort?
-> relativize by row percentage
outliers
25
Frequency
Sp2
20
7
6
5
4
3
2
1
0
15
10
5
0
0
5
10
15
Sp1
0.90
0.95
1.00
1.05
1.10
1.15
Average Distance
1.20
20
25
Multivariate distances
Similarity (S) between samples
• Range from 0 to 100% or 0 to 1
• S = 100% if two samples are totally similar (i.e.
the entries in two samples are identical)
• S = 0 if two samples are totally dissimilar (i.e.
the two samples has no species in common)
Bray-Curtis similarity
Var 1
Var 2
Var 3
Var 4
Var 5
Site 1 Site 2
12
10
8
10
4
0
10
6
4
5
Total
38
31
I site1-Site 2 I
2
2
4
4
1
13
Bray-Curtis= sum of absolute differences = 13
total abundances
(38+31)
Bray-Curtis similarity
BC3, 4 

10  20
Sp2
SU- 1
1
0
SU- 2
1
1
SU- 3
10
0
SU- 4
10
10
Sørensen Distance matrix,
expressed as percentages.
shared abundance
BC =
total abundance
100 10  10  10  0
Sp1
  33.3
Plot 1
Plot 2
Plot 3
Plot 4
Plot 1
Plot 2
Plot 3
Plot 4
0
33.3
81.8
90.5
0
83.3
83.3
0
33.3
0
Similarity matrix
Sørensen Distance matrix,
expressed as percentages.
Plot 1
Plot 2
Plot 3
Plot 4
Plot 1
Plot 2
Plot 3
Plot 4
0
33.3
81.8
90.5
0
83.3
83.3
0
33.3
0
Ordination: identifying patterns
Ordination: methods
• 1954 (Goodall) – Principal Components
analysis (PCA)
• 1957 (Bray and Curtis) - Polar Ordination (BC)
• 1964 (Kruskal) – Nonmetric Multidimensional
Scaling (NMS, NMDS)
• 1973 (Hill) – Correspondence Analysis (CA)
• 1980 (Hill and Gauch) – Detrended
Correspondence Analysis (DCA)
• 1986 (ter Braak) – Canonical Correspondence
Analysis (CCA)
• 2000s – revival of NMDS: probably current
method of choice for peer-review
Nonmetric Multidimensional Scaling
(NMDS)
Major Advantages of NMDS
• Ordination is based on the ranked
similarities/dissimilarities between
pairs of samples
The actual values of data are not being used in the ordination,
very few assumptions on the nature and quality of the data
• Ordinal data could be used
e.g. 1 = very low; 2 = low; 3 = mid; 4 = high; 5 = very high
Raw data matrix
Bray-Curtis
similarity
Rank similarity
Ordination
Modified from Clarke & Warwick, 1994
The model of NMDS
• NMDS works in a space with 2 or 3
dimensions
• The objects of interest (e.g. SUs in
ecological applications) are points in the
ordination space
• The data on which NMDS operates is a
ranked similarity matrix
The model of NMDS
• NMDS seeks an ordination in which the
distances between all pairs of SUs are,
as far as possible, in rank-order
agreement with their similarity values.
1.5
SU 4
SU 2
1
Axis22
Axis
0.5
SU 1
0
-1.5
-1
-0.5
0
0.5
1
-0.5
SU 3
-1
-1.5
Axis 11
Axis
SU 5
1.5
Model of NMDS
• Let Dij be the dissimilarity between SUs
i and j, computed with any suitable
measure (e.g. Bray-Curtis)
• let ij be the Euclidean distance
between SUs i and j in the ordination
space.
Model of NMDS
• The objective is to produce an
ordination such that:
Dij < Dkl  ij  kl for all i, j, k, l
– if any given pair of SUs have a dissimilarity
less than some other pair, then the first
pair should be no further apart in the
ordination than the second pair
• a scatter SU- of ordination distances,
, against dissimilarities, D, is known as
a Shepard diagram.
Shepard Diagram
3
Distance,
Distance 
2.5
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
DissimilarityD
Dissimilarity,
0.6
0.7
0.8
0.9
Model of NMDS
• The degree to which distances agree in rankorder with dissimilarities can be determined
by fitting a monotone regression of the
ordination distances  onto the dissimilarities
D
• A monotone regression line looks like an
ascending staircase: it uses only the ranks of
the dissimilarities
• The fitted values, ˆ , represent hypothetical
distances that would be in perfect rank-order
with the dissimilarities.
Shepard Diagram with Monotone Regression
3
2.5

ˆ
Distance,

Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
Dissimilarity, D
0.6
0.7
0.8
0.9
Badness-of-fit: “Stress”
• The badness-of-fit of the regression is
measured by Kruskal’s stress, computed
as:
 
n
S
i 1
ˆ
 ij   ij
i  2 j 1
n i 1
 
i  2 j 1
2
ij

2
Residual sum of
squares of monotone
regression
Sum of
squares of distances
Contributions to Stress (Badness-of-fit)
3
2.5
Distance,

Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
Dissimilarity, D
0.6
0.7
0.8
0.9
Model of NMDS
• Stress decreases as the rank-order
agreement between distances and
dissimilarities improves
• The aim is therefore to find the
ordination with the lowest possible
stress
• There is no algebraic solution to find
the best ordination: it must be sought
by an iterative search or trial-anderror optimization process.
Basic Algorithm for NMDS
1. Compute dissimilarities, D, among the n SUs
using a suitable choice of data standardization
and dissimilarity measure
2. Specify the number of ordination dimensions
to be used
3. Generate an initial ordination of the SUs
(starting configuration) with this number of
axes
• This can be totally random or an ordination
of the SUs by some other method might be
used.
Basic Algorithm for NMDS
4. Calculate the distances, , between each pair
of SUs in the current ordination
5. Perform a monotone regression of the
distances, , on dissimilarities, D
6. Calculate the stress
7. Move each SU point slightly, in a manner
deemed likely to decrease the stress
8. Repeat steps 4 – 7 until the stress either
approaches zero or stops decreasing (each cycle
is called an iteration).
Basic Algorithm for NMDS
• Any suitable optimization method can be
used at step 7 to decide how to move
each point
• Stress can be considered a function
with many independent variables: the
coordinates of each SU on each axis
• The aim is to find the coordinates that
will minimize this function
• This is a difficult problem to solve,
especially when n is large.
Local Optima
• There is no guarantee that the
ordination with the lowest possible
stress (global optimum) will be found
from any given initial ordination
• The search may arrive at a local
optimum, where no small change in any
coordinates will make stress decrease,
even though a solution with lower stress
does exist.
Stress
Local Optima
Local Optimum
Global Optimum
Local Optima
• run the entire ordination from several
different starting configurations
(typically at least 100)
• if the algorithm converges to the same
minimum stress solution from several
different random starts, one can be
confident the global optimum has been
found.
Worked Example of NMDS
• Densities (km-1) of 7 large mammal species in
9 areas of Rweonzori National Park, Uganda.
Elephant
Warthog
Hippo
Waterbuck
Kob
Topi
Buffalo
Area 1
1
1
15
7
9
0
12
Area 2
3
3
28
3
2
0
7
Area 3
3
8
1
10
0
0
25
Area 4
1
1
13
1
6
0
21
Area 5
4
3
21
4
0
0
18
Area 6
2
1
1
2
44
0
13
Area 7
2
1
4
1
10
0
18
Area 8
0
4
2
0
78
30
22
Area 9
0
2
6
0
71
83
17
Worked Example of NMDS
• Bray-Curtis dissimilarity matrix among the 9 areas.
• Really only need the lower triangle, without the zero
diagonals.
Area 1
Area 2
Area 3
Area 4
Area 5
Area 6
Area 7
Area 8
Area9
Area 1
0.0000
0.3626
0.5217
0.2273
0.3053
0.5185
0.3086
0.7348
0.7500
Area 2
0.3626
0.0000
0.6344
0.4382
0.2292
0.7248
0.5854
0.8462
0.8489
Area 3
0.5217
0.6344
0.0000
0.4444
0.4021
0.6546
0.4458
0.7049
0.8230
Area 4
0.2273
0.4382
0.4444
0.0000
0.2688
0.5660
0.2152
0.6648
0.7297
Area 5
0.3053
0.2292
0.4021
0.2688
0.0000
0.6637
0.3954
0.7527
0.7817
Area 6
0.5185
0.7248
0.6546
0.5660
0.6637
0.0000
0.4343
0.4070
0.5124
Area 7
0.3086
0.5854
0.4458
0.2152
0.3954
0.4343
0.0000
0.6395
0.7023
Area 8
0.7348
0.8462
0.7049
0.6648
0.7527
0.4070
0.6395
0.0000
0.2254
Area9
0.7500
0.8489
0.8230
0.7297
0.7817
0.5124
0.7023
0.2254
0.0000
Initial Ordination (Random)
8
7
Axis 2
6
9
1
10
4
3
5
Axis 1
Initial Shepard Diagram
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
Stress
• stress of initial (random) ordination is
0.4183
– This is high, reflecting the poor rank-order
agreement of distances with dissimilarities
at this stage.
• each SU point is now moved slightly
How the ordination evolved
Axis
Axis
22
Area 1
Area 3
Area 4
Area 5
Area 6
Area 7
Area 8
Area 9
Area 10
Axis 11
Axis
How stress changed
0.45
0.4
0.35
Stress
Stress
0.3
0.25
0.2
0.15
0.1
0.05
0
0
10
20
30
Iteration
Number
Iteration Number
40
50
60
Shepard Diagram – Iteration 5
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
Shepard Diagram – Iteration 10
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
Shepard Diagram – Iteration 15
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
Shepard Diagram – Iteration 20
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
Shepard Diagram – Iteration 30
3
2.5
Distance
2
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
Dissimilarity
0.6
0.7
0.8
0.9
How the ordination evolved
Axis
Axis
22
Area 1
Area 3
Area 4
Area 5
Area 6
Area 7
Area 8
Area 9
Area 10
Axis 11
Axis
The Journey of Area 3
Start
Axis 22
Axis
Final
10
5
20
Axis
11
Axis
How stress changed
0.45
0.4
0.35
Stress
Stress
0.3
0.25
Once stress starts to level out,
most SUs don’t change
much in their position
0.2
0.15
0.1
0.05
0
0
10
20
30
Iteration
Number
Iteration Number
40
50
60
Final NMDS Ordination
Stress = 0.0139
9
4
Axis 2
10
7
8
5
6
1
3
Axis 1
How low is low?
• Kruskal and later authors suggest
guidelines for interpreting the stress
values in NMDS
• NMDS ordinations with stresses up to
0.20 can be ecologically interpretable
and useful.
Stress
< 0.05
NMDS Quality
Excellent: no prospect of misinterpretation (rarely achieved)
0.05 – 0.10
Good: little danger of drawing false inferences
0.10 – 0.20
Fair: useable, but some distances will be misleading
> 0.20
Poor: ordination may be dangerous to interpret
NMDS with explanators (PC-ORD)
vectors
illustrate
relationships
of
environmental
variables to
species
composition
Grouping (cluster analysis)
5E-01
Distance (Objective Function)
3.8E+01
7.6E+01
1.1E+02
1.5E+02
100
Information Remaining (% ) “R2”
75
50
25
0
Plot1
Plot2
Plot3
Plot4
Hierarchical Clustering
• Produces a set of nested clusters organized as
a hierarchical tree
• Can be visualized as a dendrogram - a tree-like
diagram that records the sequences of merges
or splits
5
6
0.2
4
3
4
2
0.15
5
2
0.1
1
0.05
3
0
1
3
2
5
4
6
1
Strengths of Hierarchical Clustering
• No assumptions on the number of clusters
– Any desired number of clusters can be obtained
by ‘cutting’ the dendogram at the proper level
Original Points
Two Clusters
Single Linkage
-- joins the two clusters with the nearest neighbors
-- profile of joined cluster is computed from case data
Compute the nearest neighbor
distance for each cluster pair
The two clusters with the
shortest nearest neighbor
distance are joined
The centroid for the new cluster
is computed from all cases in
the new cluster
• groupings based on position of a single pair of cases
• outlying cases can lead to “undisciplined groupings” – see above
Hierarchical Clustering
• Two main types of hierarchical clustering
– Agglomerative:
• Start with the points as individual clusters
• At each step, merge the closest pair of clusters until only one cluster (or k
clusters) left
– Divisive:
• Start with one, all-inclusive cluster
• At each step, split a cluster until each cluster contains a point (or there are
k clusters)
• Traditional hierarchical algorithms use a similarity or distance
matrix
– Merge or split one cluster at a time
Agglomerative clustering algorithm
•
Most popular hierarchical clustering technique
•
Basic algorithm
1. Compute the distance matrix between the input data
points
2. Let each data point be a cluster
3. Merge the two closest clusters
4. Update the distance matrix
5. Repeat until only a single cluster remains
•
Key operation is the computation of the distance between
two clusters
–
Different definitions of the distance between clusters lead to
different algorithms
Distance between two clusters
• Each cluster is a set of points
• How do we define distance between two sets
of points
– Lots of alternatives
– Not an easy task
Linkage methods
Single
linkage
(nearest
neighbor)
Complete
linkage
(farthest
neighbor)
Centroid
linkage
(Ward’s
method)
Average
linkage
(paired
group)
Comparing groups (hypothesis testing)
- Discriminant analysis
– Multi-response Permutation Procedures (MRPP)
– Blocked MRPP (MRBP)
– Analysis of similarity (ANOSIM)
– Nonparametric multivariate analysis of variance
(NPMANOVA, a.k.a. perMANOVA)
– The Qb method
– Mantel test
Comparing groups
Species
Plot
Sp1
Sørensen distance matrix
Sp2 Grou
p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
0
20
1 0.000 0.250 0.375 0.818 0.909 0.212 0.290 0.375 0.379 0.429 0.840 1.000 0.933 1.000 1.000
2
0
12
1 0.250 0.000 0.167 0.714 0.857 0.040 0.043 0.167 0.143 0.200 0.765 1.000 0.909 1.000 1.000
3
2
10
1 0.375 0.167 0.000 0.714 0.714 0.200 0.130 0.000 0.143 0.200 0.529 0.750 0.727 0.846 0.862
4
0
2
5
1
1
δ = delta = average
1 0.818 0.714 0.714 0.000 0.500 0.733 0.692 0.714 0.636 0.600 0.429 1.000 0.833 1.000 1.000
X1
within-group
distance
1 0.909 0.857 0.714 0.500 0.000 0.867 0.846 0.714
0.818 0.800 0.429 0.667
0.667 0.875 0.895
6
0
13
2 0.212 0.040 0.200 0.733 0.867 0.000 0.083 0.200 0.182 0.238 0.778 1.000 0.913 1.000 1.000
7
0
11
2 0.290 0.043 0.130 0.692 0.846 0.083 0.000 0.130 0.100 0.158 0.750 1.000 0.905 1.000 1.000
8
2
10
2 0.375 0.167 0.000 0.714 0.714 0.200 0.130 0.000 0.143 0.200 0.529 0.750 0.727 0.846 0.862
9
0
9
2 0.379 0.143 0.143 0.636 0.818 0.182 0.100 0.143 0.000 0.059 0.714 1.000 0.895 1.000 1.000
10
0
8
2 0.429 0.200 0.200 0.600 0.800 0.238 0.158 0.200 0.059 0.000 0.692 1.000 0.889 1.000 1.000
11
3
2
3 0.840 0.765 0.529 0.429 0.429 0.778 0.750 0.529 0.714 0.692 0.000 0.333 0.467 0.684 0.727
12
4
0
3 1.000 1.000 0.750 1.000 0.667 1.000 1.000 0.750 1.000 1.000 0.333 0.000 0.429 0.556 0.619
13
9
1
3 0.933 0.909 0.727 0.833 0.667 0.913 0.905 0.727 0.895 0.889 0.467 0.429 0.000 0.250 0.333
14
14
0
3 1.000 1.000 0.846 1.000 0.875 1.000 1.000 0.846 1.000 1.000 0.684 0.556 0.250 0.000 0.097
15
17
0
3 1.000 1.000 0.862 1.000 0.895 1.000 1.000 0.862 1.000 1.000 0.727 0.619 0.333 0.097 0.000
X2
X3
Step 6: comparing groups (MRPP)
Average Sorensen distances:
XA = 1.609, XB = 1.344
Average Sorensen distances:
XA = 2.419, XB = 1.717
Step 6: comparing groups (MRPP)
observed 
A=1 expected 
heterogeneity
within groups is
as expected by
chance
A=0
Homogeneity of
each group is
more than
expected by
chance A=1
 under null hypo.
Observed  Expected Variance
0.400
0.625
0.0019
p
A
0.0007 0.359
Sig. diff
0.397
0.699
0.627
0.1730 0.055
0.0039 0.248
0.0017 0.523
No diff.
Sig. diff.
Sig. diff.
Sørensen
Pairwise
comparisons:
1 vs 2
0.376
1 vs 3
0.526
2 vs 3
0.299
0.0005
0.0019
0.0036
Obviously distinct groups
Less obvious! Are they really different?
ANOSIM
ANOSIM: “analysis of similarities”
• Warwick, Clarke & Suharsono (1990)
• Good source reference is Clarke (1993)
• Tests for difference in community
composition among groups of SUs
• Multivariate, non-parametric
• Significance test by permutation.
ANOSIM
Group 1
Group 2
ANOSIM
Group 1
Group 2
“Within groups”
dissimilarities
ANOSIM
Group 1
Group 2
“Between groups”
dissimilarities
ANOSIM
Group 1
Group 2
Within groups
Between groups
ANOSIM Statistic
rb  rw
R 1
]

[
n
(
n
1
)
4
rb = mean
rank of between group dissimilarities
rw = mean
rank of within group dissimilarities
denominator constrains R to [-1, 1]
n = total number of SU’s
ANOSIM R Statistic
• Based on the ranks of the dissimilarities
• Ranges from -1.0 to +1.0
• Ecological communities rarely have an R
< 0.
• R  0  no difference among groups
• R > 0  groups differ in community
composition.
Are groups different?
Analysis of Similarities – a statistical approach
exposed
sheltered
Are groups different?
Analysis of Similarities – a statistical approach
Ho = sites the same
Ha = sites are different
exposed
sheltered
If Ho (sites the same) = true
Similarity within = Similarity between
If Ha (sites different) = true
Similarity within > Similarity between
Are groups different?
Analysis of Similarities – a statistical approach
(rbetween - rwithin )
R=
standardizing factor
Are groups different?
Analysis of Similarities – a statistical approach
(rbetween - rwithin )
R=
~1
If Ho (sites the same) = true
Similarity within = Similarity between
(rbetween - rwithin )
R=
~1
~0
If Ha (sites different) = true
Similarity within > Similarity between
(rbetween - rwithin )
R=
~1
~1
To simulate null distribution
To simulate null distribution
Similarity within = Similarity between
To simulate null distribution
Similarity within = Similarity between
Calculate R
To simulate null distribution
Similarity within = Similarity between
Calculate R
Phyc 2003 Practice data set
243
232
Frequency
189
109
.477
88
58
35
19
10
6
-0.20
9
1
-0.15
-0.10
-0.05
0.00
0.05
0.10
R
0.15
0.20
0.25
0.30
0.35
0.40
Phyc 2003 Practice data set
243
232
1
P=
= 0.001
999
Frequency
189
109
.477
88
58
35
19
10
6
-0.20
9
1
-0.15
-0.10
-0.05
0.00
0.05
0.10
R
0.15
0.20
0.25
0.30
0.35
0.40
Significance Test for ANOSIM R
1.
Randomly permute group membership
2.
Compute R* and check whether it is  R
3.
Repeat many times (at least 1000)
p = proportion of R* values that are  R
Bray-Curtis Dissimilarity Matrix
Group 1 Group 1 Group 1 Group 1 Group 2 Group 2 Group 2
Group 1
0.4710
Group 1
0.4574
0.3647
Group 1
0.3988
0.4248
0.4417
Group 2
0.4447
0.4951
0.5694
0.5336
Group 2
0.6357
0.5622
0.5833
0.6154
0.5417
Group 2
0.6183
0.5202
0.6032
0.6395
0.5769
0.4802
Group 2
0.4489
0.3036
0.4354
0.4137
0.5315
0.6589
0.6705
Ranks of Dissimilarities
Group 1 Group 1 Group 1 Group 1 Group 2 Group 2 Group 2
Group 1
Group 1
Group 1
Group 2
Group 2
Group 2
Group 2
11
10
3
8
25
24
9
2
5
7
13
18
19
21
16
23
14
1
22
6
26
4
17
20
15
12
27
28
Computation of R
rb = 15.56 rw = 13.08
rb  rw
15.56  13.08 2.48
R


 0.1771
1
1
14
[nn  1]
[88  1]
4
4
Group 1 Group 1 Group 1 Group 1 Group 2 Group 2 Group 2
Group 1
Group 1
Group 1
Group 2
Group 2
Group 2
Group 2
11
10
3
8
25
24
9
2
5
13
7
19
16
18
14
1
21
22
6
23
26
4
17
20
15
12
27
28
Permutation of Group Membership
rb = 14.06 rw = 15.08
rb  rw
14.06  15.08  1.02
R 


 0.0729
1
1
14
[nn  1]
[88  1]
4
4
*
Group 2 Group 1 Group 1 Group 2 Group 1 Group 2 Group 1
Group 1
11
Group 1
10
3
8
2
5
13
7
19
16
25
24
9
18
14
1
21
22
6
23
26
4
Group 2
Group 1
Group 2
Group 1
Group 2
17
20
15
12
27
28
Central Highlands, Australia
NMDS of Regenerating Sites
Wildfire regeneration
Axis 2
Logging regeneration
ANOSIM
R = 0.295
Suggests a difference
Axis 1
Distribution of R* under null
hypothesis of no difference
between groups
120
80
60
Actual R
0.295
40
20
0
-0
.2
4
-0
.2
0
-0
.1
6
-0
.1
2
-0
.0
8
-0
.0
4
0.
00
0.
04
0.
08
0.
12
0.
16
0.
20
Frequency
100
R*
Central Highlands, Australia
NMDS of Regenerating Sites
Wildfire regeneration
Axis 2
Logging regeneration
ANOSIM Results
R = 0.295, p = < 0.001
Logging regeneration
differs from wildfire
regeneration
Axis 1
Pairwise ANOSIM Tests
• If overall significant effect and have more
than 3 groups, need to make multiple
comparisons (analogous to multiple means
comparisons following a significant ANOVA,
e.g., Tukey’s)
• You should correct for multiple comparisons
• Use  of 0.05 divided by number of tests
Statistical Power of ANOSIM
• Power is the probability of detecting a
difference, if one really exists, i.e., the
chance of NOT making a type II error
Test says there
Test says there
is no difference
is a difference
H 0 is t rue :
T he re is no
dif f e re nc e
J
Type I Error
H 1 is t rue :
T he re is a
dif f e re nc e
Type II Error
J
L
L
Power Analysis of ANOSIM
• For adequate power, should strive for
at least 10 replicates in each group
• To reliably detect small shifts in
community composition, larger sample
sizes are needed
• The test is sensitive to differences in
dispersion (within-group variation)
among groups.
Other methods for testing community
differences among groups
• Multi-response permutation procedure
(MRPP)
– similar to ANOSIM, but uses dissimilarity
values instead of ranks and a different test
statistic
• NPMANOVA (Anderson 2001)
– allows analysis of multi-factorial and nested
designs with any dissimilarity measure
– significance tests by random permutation
– promising method and is being implemented
more in recent years
Analysis flow
samples
species
aa
a
b
bb
c
sample
similarities
aa b
a bb
c
cc
are sites
different?
How?
c
c
ordination
Sites are different – why?
• SIMPER (Similarity Percentage) is a
simple method for assessing which
variables are primarily responsible for an
observed difference between groups of
samples (Clarke 1993).
• The overall significance of the difference
is often assessed by ANOSIM.
• The Bray-Curtis similarity measure is
implicit to SIMPER.