Friedman test EN - pdmoerland/wiki-biostatistiek-bilingual GitHub Wiki
Deze pagina lezen in het Nederlands.
Author: ir. N. van Geloven
AuthorshipThis page was translated from the Dutch-language original using AI and has not been fully reviewed. Where the two differ, the Dutch version takes precedence.
- When do I use the Friedman test?
- How do I analyze my patients in whom I measured glucose values at 12 time points?
- Where do I find the Friedman test in SPSS?
- The Friedman test does not work with missing data. What now?
- References
The Friedman test is a non-parametric test for comparing a (semi-)continuous variable between more than two paired groups.
If you want to test whether the values of a paired, (semi-)continuous variable measured more than twice differ, you can use the Friedman test. For example, if you want to test whether the results of 4 repeated measurements of a patient differ from each other.
It is a simple test for analyzing repeated measurements, and thus forms a good alternative to, for example, a repeated measurements ANOVA or linear mixed model analysis.
Example of the use of the Friedman test:
| Table 2. Procedural characteristics | |||||
|---|---|---|---|---|---|
| Variable* | measurement 1 | measurement 2 | measurement 3 | measurement 4 | p-value** |
| glucose | 5.0 [4.7;5.7] | 5.2 [4.4;5.8] | 4.9 [4.5;5.4] | 5.4 [4.9;5.8] | 0.56 |
| *Variables are denoted as median [min;max]. **Group differences were tested with the Friedman test. | |||||
For a small study, we collected glucose values at 12 time points in 9 patients, which we now want to analyze. I am trying to do this with the GLM - repeated measurements procedure in SPSS (repeated measurements ANOVA). Is this correct, and if not, which test is most suitable?
If you are only interested in whether the glucose values differ across the time points, the GLM approach is not necessary. Especially given the small number of patients, you could, for example, also perform a Friedman test. This is a non-parametric test that (like, for example, the Mann-Whitney U test) is based on the ranks of the data. I quote from the SPSS help function:
"The nonparametric tests for multiple related samples are useful alternatives to a repeated measures analysis of variance. They are especially appropriate for small samples and can be used with nominal or ordinal test variables."
The test examines whether the glucose values at the different time points differ significantly from each other (i.e. do not come from the same distribution). The test says nothing about where the differences lie, nor about whether the values increase or decrease over time.
You will find this test under Analyze -> Nonparametric Tests -> Legacy Dialogs -> K Related Samples. The data in the SPSS data file must be grouped per patient, as follows:
| patient | gluc1 | gluc2 | gluc3 | .... | gluc12 |
| 1 | 4.5 | 4.7 | 4.6 | ... | 4.4 |
| 2 | 4.9 | 4.6 | 5.2 | ... | 4.6 |
You can also find the test via Analyze -> Nonparametric Tests -> Related Samples. The advantage of this route is that SPSS also offers a post-hoc analysis here, allowing you to zoom in, once a difference is found in the overall Friedman test, on between which measurements (groups) the differences occur. There, SPSS applies the Dunn-Bonferroni adjustment for multiple testing. More explanation can be found here.
It is usually not advisable to use the Friedman test if part of the data is missing. If you want to test whether the values of a paired, (semi-)continuous variable measured more than twice differ, and there are missing values, you can use the Skillings–Mack test [1]. A condition for this, however, is that the data were collected using an incomplete block design, or are missing completely at random. You can calculate the value of the Skillings–Mack test using the skilmack command in Stata and the Skillings.Mack package in R. This test has not yet been implemented in SPSS (versions 28 and lower).
- Chatfield M, Mander A. The Skillings–Mack test (Friedman test when there are missing data). Stata J. 2009 April 1; 9(2): 299–305.
Back to OVERVIEW for an overview of all statistical topics on this wiki.
Back to SELECTION GUIDE for help in finding a suitable test or analysis.