Download presentation

Presentation is loading. Please wait.

Published byMaddison Coppins Modified about 1 year ago

1
Permutation Tests Hal Whitehead BIOL4062/5062

2
Introduction to permutation tests Exact and randomized permutation tests Permutation tests using standard statistics Mantel tests ANOSIM

3
Permutation Tests Allow hypotheses to be tested when: Distributional properties of test statistic under null hypothesis are not known –e.g. measures of genetic distance Distributional properties of test statistic under null hypothesis are complex Assumptions about data necessary for standard tests or measure of uncertainty (e.g. normality) are not met Good for small data sets

4
Permutation Tests Useful when hypotheses can be phrased in terms of order or allocation of data points: e.g. When dogs meet, larger dog barks for longer e.g. Social relationships are stronger within same sex pairs

5
Exact and Random Permutation Tests Data => Real Test Statistic Either: Compute statistic for all possible permutations of data (“Exact test”) Or: Compute statistic for, say, 1,000 random permutations (“Random test”)

6
Permutation Tests Exact test Compare real test statistic with distribution of values of all other possible test statistics Random test Compare real test statistic with distribution of values of random test statistics

7
Permutation Tests If: real statistic is greater than or equal to 3/128 possible statistics (exact test): –reject null hypothesis that allocation or ordering of units does not affect statistic: P=0.023 (1-tailed test) P=0.046 (2-tailed test) real statistic is greater than or equal to 12/1000 random statistics (random test): –reject null hypothesis that allocation or ordering of units does not affect statistic: P=0.012 (1-tailed test) P=0.024 (2-tailed test)

8
Example: dogs Null hypothesis: –Longer barking unrelated to size ordering Alternative hypothesis: –Larger dog barks longer Data –7 dogs: A > B > C > D > E > F > G Pair of dogsWho barks longer? ABA, A, B, A AFF, A, A BDB, D, D CFC, C, C EGG EFF Test statistic: No. times larger dog barks longer Y= 9

9
Example: dogs –7 dogs: A > B > C > D > E > F > G Pair of dogsWho barks longer? ABA, A, B, A AFF, A, A BDB, D, D CFC, C, C EGG EFF Test statistic: No. times larger dog barks longer Y= 9 RANDOM: G > B > A > C > F > D > E Pair of dogsWho barks longer? ABA, A, B, A AFF, A, A BDB, D, D CFC, C, C EGG EFF Random statistic: No. times larger dog barks longer Y= 8

10
Example: dogs No. times larger dog barks longer: Y= 9 In 5040 exact permutations: –Y> times –do not reject null hypothesis (P=0.324) In 1000 random permutations: –Y>9 332 times –do not reject null hypothesis (P=0.332)

11
Can use permutation tests with normal test statistics when assumptions are not valid

12
Example: contingency table with small sample sizes ABCDEF I II III IV G=25.18 df=15 P=0.047 But expected numbers are too small for valid G-test Random permutation (totals same) G(r)=15.82 For 10,000 random permutations: G>G(r) in 304; P=0.0304

13
Comparing Association Matrices: Mantel Test May help with problems of independence 2 association matrices, indexed by same units: –Evolution: genetic similarity and environmental similarity between populations –Behaviour: gender similarity (1/0) and association index between individuals –Population genetics: genetic similarity and geographic distance between populations

14
Comparing Association Matrices: Mantel Test Matrices can be 0:1's Matrix correlation coefficient: similarity between the two association matrices Mantel test tests the null hypothesis that there is no relationship between the associations shown on the two matrices

15
Mantel Tests Given two symmetric association matrices: a 11 a 12 a a 1k b 11 b 12 b b 1k a 21 a 22 a a 2k b 21 b 22 b b 2k a 31 a 32 a a 3k b 31 b 32 b b 3k... a k1 a k2 a k3....a kk b k1 b k2 b k3....b kk Matrix correlation coefficient (r) is the correlation between: {a 21, a 31, a 32,..., a k1, a k2, a k3,...., a kk-1 }, and {b 21, b 31, b 32,..., b k1, b k2, b k3,...., b kk-1 } [Cannot be tested using standard methods because of lack of independence] r=1 : maximal positive relationship r=0 : no relationship r=-1 : maximal negative relationship

16
Partial Mantel Tests Are X and Y related, controlling for V? Among populations of an organism –Is genetic similarity related to morphological similarity controlling for geographical distance?

17
Mantel Tests Mantel test uses statistic: k Z =Σ Σ a ij. b ij i=1 j=1 Z can be transformed into a variable W, approximately normal (0 mean and s.d. 1) under the null hypothesis (r=0) Somewhat dubious at small k

18
Mantel Tests Better to: –randomly permute the individuals in one matrix many times –each time calculate Z (Z m ’s) Compare real Z with Z m ’s If Z>97.5% of the Z m ’s, or Z<97.5% of Z m ’s, then the null hypothesis that r=0 is rejected –there is a relationship between variables

19
Mantel test: example Do bottlenose whales associate with their kin? 14 whales Microsatellite-based estimate of kin relatedness versus association index: –Matrix correlation r = –Mantel test P = 0.83 (1,000 perms) They do not seem to preferentially associate with their kin

20
Mantel Test: Example Coda repertoire of sperm whales Repertoire similarity R1 R2 R3 R4 R5 R6 R7 R8 R R R R R R R R Groups: Group similarity R1 R2 R3 R4 R5 R6 R7 R8 R R R R R R R R Mantel test: Group vs Repertoire P=0.00 Groups seem to have distinct repertoires

21
Mantel Test: Example Coda repertoire of sperm whales Repertoire similarity R1 R2 R3 R4 R5 R6 R7 R8 R R R R R R R R Groups: Group similarity R1 R2 R3 R4 R5 R6 R7 R8 R R R R R R R R Partial Mantel test: Group vs Repertoire controlling for clan P=0.69 Groups do not seem to have distinct repertoires within clans Clans: Clan similarity

22
ANOSIM Analysis of Similarities (“R test”) Version of ANOVA for similarity of dissimilarity matrices –Similarity/dissimilarity matrix with units grouped Closely related to Mantel test –In which one matrix indicates group membership Programme PRIMER

23
Dissimilarity matrix with groups of units ABCDE A0 B0.20 C D E

24
ABCDE A0 B20 C48.50 D E ABCDE A0 B0.20 C D E Ranks

25
ABCDE A0 B20 C48.50 D E Ranks Mean rank within groups r W = Mean rank between groups r B = ANOSIM statistic R = (r B – r W )/[n(n-1)/4] – = 0.791

26
ANOSIM statistic ANOSIM statistic R = (r B – r W )/[n(n-1)/4] -1 < R < 1 R = 0 if high and low ranks perfectly mixed between versus within groups R = 1 or -1 for maximal differences between groups But is R statistically different from 0?

27
Testing ANOSIM statistic Permute group assignations many times, and calculate R*’s Compare with real R

28
ANOSIM Can be done with more than 2 groups More complex designs –Two-way –Nested designs Can be done without ranking –Then absolute value of R has less meaning –Almost same as Mantel test

29
Issues with Permutation Tests Results of permutation test strictly refer to only the data set not the wider population –unless sampled at random How many permutations? –Depends on test and p-value –Tradeoff between accuracy and computer time –Usually ,000 permutations

30
Permutation Tests Allow hypotheses to be tested when: –Distributional properties unknown –Distributional properties of test statistic complex –Usual assumptions not met (need independence) Good for small data sets Can check analytically-based tests Mantel tests compare two or more association matrices –may help deal with independence issues ANOSIM (or Mantel tests) can do ANOVA-like analyses of similarity or dissimilarity matrices

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google