Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nonparametric tests I Back to basics. Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which.

Similar presentations


Presentation on theme: "Nonparametric tests I Back to basics. Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which."— Presentation transcript:

1 Nonparametric tests I Back to basics

2 Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which type of test to use

3 MTB > dotplot 'Male' 'Female'; SUBC> same.. : :: :..:::.. :..:: :....:..... : MALE..:. : : :..: ::::::.::.:. ::.: :. : FEMALE

4 MTB > dotplot 'Male' 'Female'; SUBC> same.. : :: :..:::.. :..:: :....:..... : MALE..:. : : :..: ::::::.::.:. ::.: :. : FEMALE MTB > desc 'Male' 'Female’ Variable N Mean Median TrMean StDev SEMean MALE FEMALE Variable Min Max Q1 Q3 MALE FEMALE

5 Lecture Outline What is a nonparametric test? –What is a parameter? –What are examples of non-parametric tests? Rank tests, distribution free tests and nonparametric tests Which type of test to use

6 Parameters are central to inference in GLM and ANOVA and represent assumptions about the underlying processes

7 LET K1=4.7 # Group 1 mean minus grand mean LET K2=-2.5 # Group 2 mean minus grand mean LET K3=10.4 # The grand mean LET K4=1.9 # Standard deviation of the error RANDOM 30 'Error' LET 'Y'=K3+K1*'DUM1'+K2*'DUM2'+K4*'Error'

8 LET K1=4.7 # Group 1 mean minus grand mean LET K2=-2.5 # Group 2 mean minus grand mean LET K3=10.4 # The grand mean LET K4=1.9 # Standard deviation of the error RANDOM 30 'Error' LET 'Y'=K3+K1*'DUM1'+K2*'DUM2'+K4*'Error' Fitted value =  + Group 1  1 2  2 3-  1 -  2 Error has Normal Distribution with zero mean and standard deviation 

9 LET K1=4.7 # Group 1 mean minus grand mean LET K2=-2.5 # Group 2 mean minus grand mean LET K3=10.4 # The grand mean LET K4=1.9 # Standard deviation of the error RANDOM 30 'Error' LET 'Y'=K3+K1*'DUM1'+K2*'DUM2'+K4*'Error' Fitted value =  + Group 1  1 2  2 3-  1 -  2 Error has Normal Distribution with zero mean and standard deviation 

10 Parameters are central to inference in GLM and ANOVA but represent assumptions about the underlying processes

11 Parameters are central to inference in GLM and ANOVA but represent assumptions about the underlying processes can be done without in some simple situations

12 Parameters are central to inference in GLM and ANOVA but represent assumptions about the underlying processes can be done without in some simple situations – BUT HOW?

13 RnkWtSex

14 RnkWtSex Remember ties

15 Mean Rank

16 The ‘Male’ mean rank = The ‘Female’ mean rank = Mean Rank

17 MTB > mann-whitney male female

18 Mann-Whitney Test and CI: MALE, FEMALE

19 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median =

20 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200)

21 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W =

22 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Sum of ranks of 2763 corresponds to a mean rank of 2763/50 = 55.26

23 The ‘Male’ mean rank = The ‘Female’ mean rank = Mean Rank

24 The ‘Male’ mean rank = The ‘Female’ mean rank = Mean Rank

25 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Test of ETA1 = ETA2 vs ETA1 not = ETA2 is significant at

26 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Test of ETA1 = ETA2 vs ETA1 not = ETA2 is significant at The test is significant at (adjusted for ties)

27 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Test of ETA1 = ETA2 vs ETA1 not = ETA2 is significant at The test is significant at (adjusted for ties) Cannot reject at alpha = 0.05

28 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Test of ETA1 = ETA2 vs ETA1 not = ETA2 is significant at The test is significant at (adjusted for ties) Cannot reject at alpha = 0.05

29 MTB > mann-whitney male female Mann-Whitney Test and CI: MALE, FEMALE MALE N = 50 Median = FEMALE N = 50 Median = Point estimate for ETA1-ETA2 is Percent CI for ETA1-ETA2 is ( ,0.1200) W = Test of ETA1 = ETA2 vs ETA1 not = ETA2 is significant at The test is significant at (adjusted for ties) Cannot reject at alpha = 0.05 The null hypothesis is better expressed as “the distributions of male and female weights are the same”.

30 Parameters are central to inference in GLM and ANOVA but represent assumptions about the underlying processes can be done without in some simple situations

31 Nonparametric vs Parametric

32 Sign TestOne-sample t-test

33 Nonparametric vs Parametric Sign Test Mann-Whitney Test One-sample t-test Two-sample t-test

34 Nonparametric vs Parametric Sign Test Mann-Whitney Test Spearman Rank Test One-sample t-test Two-sample t-test Correlation/Regression

35 Nonparametric vs Parametric Sign Test Mann-Whitney Test Spearman Rank Test Kruskal-Wallis Test One-sample t-test Two-sample t-test Correlation/Regression One-way ANOVA

36 Nonparametric vs Parametric Sign Test Mann-Whitney Test Spearman Rank Test Kruskal-Wallis Test Friedman Test One-sample t-test Two-sample t-test Correlation/Regression One-way ANOVA One-way blocked ANOVA

37 Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which type of test to use

38 A rose by any other name.. Non-parametric tests lack parameters Rank tests start by ranking the data Distribution-free tests don’t assume a Normal distribution (or any other) These are mainly but not completely overlapping sets of tests (and some are scale-invariant too).

39 Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which type of test to use

40 Fewer assumptions but... still some assumptions (including independence) limited range of situations –no more than 2 x-variables –can’t mix continuous and categorical x-variables provide p-values but estimation is dodgy loss of efficiency if parametric assumptions are upheld there is a grand scheme for parametric statistics (GLM) but a lot of separate strange names for nonparametrics

41 When is there a choice? when there is a non-parametric test –fewer than two or three variables altogether and prediction is not required

42 How to choose: If the assumptions of parametric test are upheld, use it – on grounds of efficiency If not upheld, consider fixing the assumptions (e.g. by transforming the data, as in the practical) If assumptions not fixable, use nonparametric test

43 MTB > dotplot 'LogM' 'LogF'; SUBC> same ::: :... :::.. :..::.:....: : :. : LogM.:. :... : ::.:: : :. ::.::. ::.:. :. : LogF

44 MTB > dotplot 'LogM' 'LogF'; SUBC> same ::: :... :::.. :..::.:....: : :. : LogM.:. :... : ::.:: : :. ::.::. ::.:. :. : LogF MTB > desc 'LogM' 'LogF' Variable N Mean Median TrMean StDev SEMean LogM LogF Variable Min Max Q1 Q3 LogM LogF

45 Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which type of test to use

46 Last remarks Nonparametric tests are an opportunity to revise the basic ideas of statistical inference They are sometimes useful in biology They are often used in biology NEXT WEEK: more nonparametrics, including confidence intervals and randomisation tests. READ the handout


Download ppt "Nonparametric tests I Back to basics. Lecture Outline What is a nonparametric test? Rank tests, distribution free tests and nonparametric tests Which."

Similar presentations


Ads by Google