Performs a two sample full randomization test on vectors of data.
Usage
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.
Value
numeric
the probability of the null hypothesis of no difference between means.
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.
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.
# 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)