dFriedman(x, r, N, log=FALSE)
pFriedman(q, r, N, lower.tail=TRUE, log.p=FALSE)
qFriedman(p, r, N, lower.tail=TRUE, log.p=FALSE)
rFriedman(n, r, N)
sFriedman(r, N)
dFriedman()
gives the density, pFriedman()
the distribution function and qFriedman()
its inverse. rFriedman()
generates random numbers. sFriedman()
produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis.Formulae:
Let $R_j$ be the sum of ranks for treatment $j (j=1\dots r)$, then the Friedman statistic is
$$x=\frac{12}{N r (r+1)}\sum_{j=1}^{r}R_j^2 -3N(r+1)$$
this is asymptotically equivalent to a $\chi^2$ random variable. One may also calculate the chi squared statistic for the usual analysis of variance which gives
$$F=\frac{(N-1)x}{N(r-1)-x}$$
which may be used with the F distribution functions in R for degrees of freedom $(r-1)$ and $(N-1)(r-1)$.
Iman, R.L. and Davenport, J.M. (1980). Approximations of the critical region of the Friedman statistic. Comm. Stat. Theor. Meth. A9(6). 571-595.
Odeh, R.E. (1977). Extended tables of the distribution of Friedman's S-statistic in the two-way layout. Commun. Statist.-Simula. Computa. B6(1). 29-48.
pFriedman(2, r=5, N=10)
pFriedman(c(.8,3.5,9.3), r=5, N=10) ## approximately 5\% 50\% and 95\%
sFriedman(r=5, N=10)
plot(function(x)dFriedman(x, r=5, N=10),0,10)
Run the code above in your browser using DataLab