Full randomization test

Description

Performs a two sample full randomization test on vectors of data.

Usage

1
frt(x, y, alternative = "two.sided")

Arguments

x

a numeric vector

y

a numeric vector

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

Details

The function tests all the (n + m)! / n!m! possible arrangements, where n and m are the lengths of x and y respectively. This number (just as computational times and memory requirements) grows extremely fast with n and m.

Value

numeric

the probability of the null hypothesis of no difference between means.

Author(s)

Giangiacomo Bravo

References

Box, G.E.P, Hunter, J.S. and Hunter, G.W. (2005), Statistics for Experimenters: Design, Innovation, and Discovery. Second Edition. Hoboken, NJ: Wiley.

See Also

frt.paired

Examples

1
2
3
4
5
6
7
# Tomato yield example in Box et al. (2005, 78--80)
data(tomatoes)
attach(tomatoes)
x <- pounds[fertilizer == "A"]
y <- pounds[fertilizer == "B"]
frt(x, y, alt="l")
detach(tomatoes)