Title: | Conduct Permutation Analysis of Variance in R |
---|---|
Description: | Conduct permutation One-Way or Two-Way Analysis of Variance in R. Use different permutation types for two-way designs. |
Authors: | Osama Abdalla |
Maintainer: | Osama Abdalla <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-16 04:34:00 UTC |
Source: | https://github.com/ohabdalla1/permutationr |
Conducts permutational one-way and two-way ANOVAs. This code has been modified from Howell D. (2015)
permuANOVA(y,x,z, perm.type="unrestricted", reps=5000)
permuANOVA(y,x,z, perm.type="unrestricted", reps=5000)
y |
Dependent variable, numeric vector |
x |
Independent variable, integer vector or factor up to 10 levels |
z |
(Optional) Independent variable, integer vector or factor up to 10 levels |
perm.type |
(Optional) Method of permutation for two-way designs. Either "unrestricted" or "restricted". Default is "unrestricted" |
reps |
Number of permutations, default is 5000. |
"unrestricted" computes main effect permutations in an unrestricted fashion; "restricted" restricts main effect permutations within levels of the other independent variable. In both cases, the interaction is computed in an unrestricted fashion
For two-way designs: returns a data-frame containing p-values from permutation test for "Variable_x", "Variable_z" and interaction "x:z" For one-way designs: returns a data-frame containing p-values from permutation test for "Variable_x" only.
Osama Abdalla [email protected]
Howell D. (2015). Permutation Tests for Factorial ANOVA Designs. Retrieved from: <https://www.uvm.edu/~statdhtx/StatPages/Permutation%20Anova/PermTestsAnova.html>
Package permuco function aovperm() and Package RVAideMemoire function perm.anova()
Data <- ToothGrowth attach(ToothGrowth) permuANOVA(y = len, x = supp, reps=99) permuANOVA(y=len,x=supp,z=dose, perm.type="unrestricted", reps=99) permuANOVA(y=len,x=supp,z=dose, perm.type="restricted", reps=99)
Data <- ToothGrowth attach(ToothGrowth) permuANOVA(y = len, x = supp, reps=99) permuANOVA(y=len,x=supp,z=dose, perm.type="unrestricted", reps=99) permuANOVA(y=len,x=supp,z=dose, perm.type="restricted", reps=99)