FRIEDMAN procedure

Performs Friedman's nonparametric analysis of variance (S. Langton).


Options

PRINT = strings
Output required (test, ranks); default test

TREATMENTS = factor
Treatment factor

BLOCKS = factor
Block factor


Parameters

DATA = variates
Identifier of the variate holding the data values

RANKS = variates
Saves the ranks

STATISTIC = scalars
Saves the test statistic

DF = scalars
Saves the degrees of freedom for the chi-square approximation

PROBABILITY = scalars
Saves the probability value for the chi-square statistic


Description

Friedman's test is a nonparametric test for analysing a randomized complete block design. That is, the data consists of observations on k treatments assessed under n different conditions (blocks). The variate of observations is specified using the DATA parameter, whilst options TREATMENTS and BLOCKS supply the treatment and blocking factors. FRIEDMAN calculates the test statistic together with a probability value based on a chi-square approximation. If sample sizes are small, stored tabulated values are printed in addition.

   The PRINT option controls printed output, with settings test to print the various test statistics, and ranks to print the ranks (together with the BLOCKS, TREATMENTS and DATA).

   Parameters RANKS, STATISTIC, DF and PROBABILITY can be used to save the ranks, the test statistic (adjusted for ties), the degrees of freedom for the chi-square approximation, and the probability value for the chi-square approximation.


Options: PRINT, TREATMENTS, BLOCKS.

Parameters: DATA, RANKS, STATISTIC, DF, PROBABILITY.


Method

The Friedman test is a test for treatment differences in a randomized complete block design: i.e. a test of the null hypothesis that the samples arise from distributions with the same mean versus the alternative that the distribution means differ. Each block is checked in turn to ensure that it consists of exactly one replicate of each treatment, after excluding any units which are restricted out or which have missing values for DATA, TREATMENTS or BLOCKS. Any block not meeting this condition is excluded from analysis and a warning is printed. The treatments are ranked within each block and the sum of the ranks is calculated for each treatment group over all valid blocks. The sum of the squared values of these rank sums is calculated, as is the sum of the cubed sizes of all groups of ranks (i.e. 1 for an untied observation, 23=8 for pairs of ties, etc.).


The test statistic is formed using the equation (Siegel & Castellan 1988):

Fr = 12 × R / (n × k × (k + 1)) - 3 × n × (k + 1)

where R is the sum of the squared rank sums,

k is the number of treatments, and

n is the number of blocks.

A version adjusted for ties is also formed, and this version is used for calculating the significance level:

Fr = {12 × R - 3 × n2 × k × (k + 1)2} / {n × k × (k + 1) + (n × k - T) / (k - 1)}

where T is the sum of the cubed sizes of rank groups.


Action with RESTRICT

Any units that are restricted for DATA, BLOCKS or TREATMENTS (or which have missing values) are excluded from the analysis. Any block which no longer has one replicate of each treatment as a result of such restrictions is excluded in its entirety.


Reference

Siegel, S. & Castellan, N.J. (1988). Nonparametric Statistics for the Behavioural Sciences (second edition). McGraw-Hill, New York.