The function FriedmanTest performs a Friedman test of homogeneity of matched samples having at least 3 groups. The observed values have to be stored in the matrix Data whose rows are the observations and whose columns are the groups. A minimum number of three groups is required. The function returns the chisquare statistic in the variable parameter Chi2Stat and the corresponding pvalue as the function value.
Please note that the pvalue is an asymptotic value obtained from the chi square distribution. This value is not accurate for a low number of groups and/or a low number of observations. As a rule of thumb the pvalue is reliable only if the product of the number of columns and the number of rows of the data matrix exceeds 40.
