Research Design and Statistics Lecture 8 - Non-Parametric Tests PDF

Document Details

CommodiousApostrophe6548

Uploaded by CommodiousApostrophe6548

University of York

Tags

non-parametric tests statistics research design data analysis

Summary

This document provides a lecture outline on non-parametric statistical tests. It covers topics such as data analysis and interpretation, with a focus on various non-parametric methods. It includes a decision tree to guide users in selecting the appropriate statistical tests.

Full Transcript

Research Design and Statistics Lecture 8: Non-parametric tests Overview Categorical Data Chi-squared & likelihood ratio test Use of nonparametric tests The Mann-Whitney test Wilcoxon's signed-ranks test Kruskal-Wallis ANOVA on ranks Fri...

Research Design and Statistics Lecture 8: Non-parametric tests Overview Categorical Data Chi-squared & likelihood ratio test Use of nonparametric tests The Mann-Whitney test Wilcoxon's signed-ranks test Kruskal-Wallis ANOVA on ranks Friedman's rank test on correlated samples Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO Categorical outcomes: chi-square In this sort of scenario each participant is allocated to one and only one category A few examples: Pass or Fail Pregnant or not pregnant Win, draw or Lose Each individual, therefore contributes to the frequency (or count) with which a category occurs Categorical outcomes: chi-square An example: Can cats be trained to dance more effectively with food or affection at a reward? Training Food as reward Affection as total Reward Could they dance yes 28 48 76 no 10 114 124 total 38 162 200 Categorical outcomes: chi-square An example: Can cats be trained to dance more effectively with food or affection at a reward? There are four categories for the frequencies Training Food as reward Affection as total Reward Could they dance yes 28 48 76 no 10 114 124 total 38 162 200 Categorical outcomes: chi-square The row totals give frequencies of dancing and non dancing cats If we divide row totals by the total number of participants, we have the proportion of cats that can and cannot dance Training Food as reward Affection as total Reward Could they dance yes 28 48 76 no 10 114 124 total 38 162 200 Categorical outcomes: chi-square The column totals give frequencies of food and affection as reward These are the numbers in each group Training Food as reward Affection as total Reward Could they dance yes 28 48 76 no 10 114 124 total 38 162 200 Categorical outcomes: chi-square Our model this time is the null Training hypothesis, which can be set Food as Affection total up on the basis of expected reward as Reward frequencies, four all four Could they yes 28 48 76 dance variable combinations, based on the idea that the variable no 10 114 124 of interest has no effect on total 38 162 200 frequencies FEfood,yes = proportion expectedyes x the size of the food group FEfood,yes= RowTotalyes/N x ColumnTotalfood Categorical outcomes: chi-square Training Our model this time is the null hypothesis, which can be set Food as Affection total reward as Reward up on the basis of expected frequencies, four all four Could they yes 28 48 76 dance Row total variable combinations, based no 10 114 124 on the idea that the variable of interest has no effect on total 38 162 200 size of group frequencies FEfood,yes = proportion expectedyes x the size of the food group FEfood,yes= RowTotalyes/N x ColumnTotalfood Categorical outcomes: chi-square OBS Training EXP Training Food as Affection Food as Affection reward as Reward reward as Reward yes 28 48 yes 14.44 61.56 no 10 114 no 23.56 100.44 χ2 = Σ(OFij - EFij)2/EFij Compute for all cells and then sum df = (r-1)(c-1) Categorical outcomes: Likelihood ratio - preferred when samples are small OBS Training EXP Training Food as Affection Food as Affection reward as Reward reward as Reward yes 28 48 yes 14.44 61.56 no 10 114 no 23.56 100.44 Lχ2 = 2 ΣOFij ln(OFij/EFij) Compute for all cells and then sum df = (r-1)(c-1) Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO ​ Comparing two independent conditions: Wilcoxon rank sum test OR Mann-Whitney U test Two steps for both statistics: 1. Rank all the data on the the basis of the scores irrespective of the group 2. compute the sum of ranks of each group For Wilcoxon, the statistic WS is the lower of the two sums of ranks For Mann-Whitney, the statistic U use the sum of ranks for group 1, R1, as follows U = n1n2 + n1(n2 + 1)/2 - R1 ​ Comparing two independent conditions: Wilcoxon rank sum test OR Mann-Whitney U test Here we have data for two groups; one taking alcohol, the other ecstasy. The scores for a measure of depression. Scores were obtained on two days; Sunday and Wednesday. The drugs were administered on Saturday. Two steps for both statistics: 1. Rank all the data on the the basis of the scores irrespective of the group 2. compute the sum of ranks of each group ​ Comparing two independent conditions: Wilcoxon rank sum test OR Mann-Whitney U test Two steps for both statistics: 1. Rank all the data on the the basis of the scores irrespective of the group 2. compute the sum of ranks of each group The graphic here shows how we can list the scores in order and as a result assign each score a rank. When scores tie, we give them the average of the ranks. If we ensure we keep track of the group the scores came from we can relatively easily add the ranks up for each group. Note, that if there was little difference between the groups the sums of their ranks would be similar, as they are for the data shown her for Sunday. However, the sum of ranks differ considerably for the data obtained on Wednesday. Wilcoxon sum of ranks - is the value significant? For Wilcoxon, the statistic WS is the lower of the two sums of ranks For group sizes of n1 and n2 the mean of WS is given by: WS = n1(n1 + n2 + 1)/2 the standard error of WS is given by: SEWS = square root [ n1n2(n1 + n2 + 1)/12 ] Wilcoxon sum of ranks - is the value significant? For group sizes of n1 and n2 the mean of WS is given by: WS = n1(n1 + n2 + 1)/2 the standard error of WS is given by: SEWS = square root [ n1n2(n1 + n2 + 1)/12 ] So, we can compute the z score of the WS z = (WS - WS )/SEWS Mann-Whitney For Mann-Whitney, the statistic U use the sum of ranks for group 1, R1, as follows U = n1n2 + n1(n2 + 1)/2 - R1 The first terms involving n1 and n2 actually compute the maximum possible sum of ranks for group 1. U is zero when all those in group one have scores that exceed the scores of those in group 2. 1...... n2 n2+1...... n1 + n 2 1 2 3 4 5 6 7 8 Group 2 Group 2 Group 2 Group 2 Group 1 Group 1 Group 1 Group 1 Output There is a summary table, which lists the hypotheses, the test applied, the p value and the ‘Decision’ Clicking on a row of the table takes you to the graphs and statistical tables Note both U and W are reported in the table *Refer to the videos for ‘How to’ guides Output - effect size Also important is the ‘Standardized Test Statistic’ This the z score, which in turn can allow you to compute the effect size as follows r = z/sqrt(N) Where N is the number of participants *Refer to the videos for ‘How to’ guides ​ Comparing two related conditions: Wilcoxon signed-rank test Two four for both statistics: 1. Compute the difference between scores for the two conditions 2. Note the sign of the difference (positive or negative) 3. Rank the differences ignoring the sign and also exclude any zero differences from the ranking 4. Sum the ranks for positive and negative ranks Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO ​ Comparing two related conditions: Wilcoxon signed-rank test Two four for both statistics: 1. Compute the difference between scores for the two conditions 2. Note the sign of the difference (positive or negative) 3. Rank the differences ignoring the sign and also exclude any zero differences from the ranking 4. Sum the ranks for positive and negative ranks Wilcoxon signed-rank test - is the value significant? For group size n the mean of T is given by: T = n(n + 1)/4 the standard error of T is given by: SET = square root [ n(n + 1)(2n + 1)/24 ] So, we can compute the z score of the T z = (T - T )/SET Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO ​ Differences between several independent groups: the Kruskal–Wallis test Two steps for both statistics: 1. Rank all the data on the the basis of the scores irrespective of the group 2. Compute the sum of ranks of each group, Ri , where i is the group number For Kruskal-Wallis, the statistic H is as follows Differences between several independent groups: the Kruskal–Wallis test The to the right shows the ‘Non- parametric tests Two or More Independent Samples’ SPSS window We select the column variable thank contains our outcome so it appears the list of ‘Test Fields’ We then select the group coding variable to appear in the ‘Groups’ list Differences between several independent groups: the Kruskal–Wallis test The to the right shows the ‘Non- parametric tests Two or More Independent Samples’ SPSS window In the settings tab, we select the Kruskal-Wallis test and some other options to perform the equivalent to post hoc tests and contrasts. Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO ​ Differences between several related groups: Friedman’s ANOVA Two steps for both statistics: 1. Rank the scores or each individual - that means you will have ranks varying from 1 to the number of conditions the participants took part in 2. Compute the sum of ranks, Ri , for each condition For Friedman, the statistic F is as follows Differences between several related groups: Friedman’s ANOVA The to the right shows the ‘Non- parametric tests Two or More Related Samples’ SPSS window We select the column variables thank contains our outcome for the different conditions so it appears the list of ‘Test Fields’ Differences between several related groups: the Friedman test The to the right shows the ‘Non- parametric tests Two or More Related Samples’ SPSS window In the settings tab, we select the Friedman test and some other options to perform the equivalent to post hoc tests and contrasts. Decision tree - our learning framework 1. What sort of CONTINUOUS (CONT) CATEGORICAL (CAT) measurement? 2. How many predictor TWO variables? ONE TWO (or more) ONE (or more) 3. What type of predictor CONT CAT CONT CAT BOTH CAT CONT CAT CONT BOTH variable? 4. How many levels of MORE THAN categorical predictor? TWO TWO 5. Same (S) or Different (D) participants for each S D S D S D BOTH D D predictor level? independent ANOVA Multiple regression 6. Meets assumptions t-test (independent) measures ANVOA One-way repeated measures ANOVA t-test (dependent) Factorial repeated Factorial ANOVA for parametric tests? Factorial mixed Correlation or Independent Regression YES ANCOVA One-way Pearson ANOVA Logistic Regression Logistic Regression Logistic Regression Log-linear analysis Chi-Squared test Mann-Whitney Kruskal-Wallis Spearman Friedman Willcoxon NO

Use Quizgecko on...
Browser
Browser