Learn R Programming

asbio (version 0.2-1)

perm.fact.test: Permutation test for two and three way factorial designs.

Description

Provides permutation tests for two and three way designs, using permutations of of the response vector with respect to factor levels. One way permutation tests are provided by MC.test, and the function oneway_test in coin.

Usage

perm.fact.test(Y, X1, X2, X3 = NA, perm = 100)

Arguments

Y
A vector of response data. A quantitative vector.
X1
A vector of factor levels describing factor one.
X2
A vector of factor levels describing factor two.
X3
If necessary, a vector of factor levels describing factor three.
perm
Number of permutations.

Value

  • A dataframe is returned describing initial F test statistics for main effects and interactions, degrees of freedom, and permutation p-values.

Details

The method used here is based on Manly (1997).

References

Manly, B. F. J. (1997) Randomization and Monte Carlo methods in biology, 2nd edition. Chapman and Hall, London.

See Also

MC.test

Examples

Run this code
lizard<-data.frame(ants=c(13,242,105,8,59,20,515,488,88,18,44,21,182,21,7,24,312,68,
460,1223,990,140,40,27),size=factor(c(rep(1,12),rep(2,12))),
month=factor(rep(rep(c(1,2,3,4),each=3),2)))
attach(lizard)
perm.fact.test(ants,month,size,perm=100)

Run the code above in your browser using DataLab