friedman.t: Friedman test

View source: R/friedman.R

friedman.tR Documentation

Friedman test

Description

Performs a Friedman rank sum test with multiple comparisons.

Usage

friedman.t(
  dfr,
  y,
  treat,
  block,
  alpha = 0.05,
  print.mc = TRUE,
  print.pc = TRUE
)

Arguments

dfr

The name of the data frame.

y

The name of the column for the variable to analyze.

treat

The name of the column that identifies the treatments.

block

The name of the column that identifies the blocks.

alpha

Significant level for comparisons.

print.mc

Logical, if TRUE, it prints multiple comparisons groups.

print.pc

Logical, if TRUE, it prints pairwise comparisons tests.

Details

It tests the null hypothesis that the treatments have identical effects.

Value

It returns the Friedman test and a the multiple comparisons.

Author(s)

Raul Eyzaguirre.

References

Conover, W. J.(1999). Practical Nonparametric Statistics..

Examples

# From Conover (1999)
dfr <- data.frame(y = c(4, 4, 3, 3, 4, 2, 1, 2, 3.5, 4, 4, 3.5,
                        3, 2, 1.5, 1, 2, 2, 3, 4, 1, 1, 2, 1,
                        2, 3.0, 1.5, 2, 1, 2, 2, 1, 2, 3, 3, 2,
                        1, 1, 4, 4, 3, 4, 4, 3, 3.5, 2, 1, 3.5),
                  grass = gl(4, 12),
                  homeowner = rep(1:12, 4))
friedman.t(dfr, "y", "grass", "homeowner")

reyzaguirre/st4gi documentation built on March 29, 2025, 10:38 p.m.