University of Minnesota, Twin Cities
School of Statistics
Stat 5601
Rweb

# Stat 5601 (Geyer) Examples
(Two-Way Layout)

## Contents

To do each example, just click the "Submit" button.
You do not have to type in any R instructions or specify a dataset.
That's already done for you.
### Example 7.1 in Hollander and Wolfe.

#### Comments

**Note:** In the `friedman.test`

function call the
"groups" variable goes in front of the vertical bar and the "blocks"
variable goes behind the vertical bar. We are looking for a "method"
effect here so `method`

goes in front of the bar.

The second analysis done by the `aov`

function is the
usual parametric procedure: two-way ANOVA. It produces
`P` = 0.004084 for comparison with the Friedman `P`-value.

The first line tells R that `player`

is to be treated as
a factor

, that is, as a non-numerical variable. If it were
omitted, the ANOVA would be nonsense. For some
reason `friedman.test`

comes out the same if it is omitted.

We don't also have to tell R that `method`

is a factor,
because it automatically treats any non-numerical variable as a factor.
If method had been designated by numerical codes, we would also need
a statement like the first line for `method`

.

If R were consistent, these two analyses would have similar syntax,
but it isn't and they don't.