friedman.test(y, groups, blocks)
y
| either a numeric vector of data values, or a data matrix. |
groups
|
a vector giving the group for the corresponding
elements of y if this is a vector; ignored if y
is a matrix. If not a factor object, it is coerced to one.
|
blocks
|
a vector giving the block for the corresponding
elements of y if this is a vector; ignored if y
is a matrix. If not a factor object, it is coerced to one.
|
friedman.test
can be used for analyzing unreplicated complete
block designs (i.e., there is exactly one observation in y
for each combination of levels of groups
and blocks
)
where the normality assumption may be violated.
The null hypothesis is that apart from an effect of blocks
,
the location parameter of y
is the same in each of the
groups
.
If y
is a matrix, groups
and blocks
are
obtained from the column and row indices, respectively. NA
's
are not allowed in groups
or blocks
; if y
contains NA
's, corresponding blocks are removed.
"htest"
containing the following
components:
statistic
| the value of Friedman's chi-square statistic. |
parameter
| the degrees of freedom of the approximate chi-square distribution of the test statistic. |
p.value
| the p-value of the test. |
method
|
the string "Friedman rank sum test" .
|
data.name
| a character string giving the names of the data. |