I'm trying to check my understanding of how to determine the appropriate permutation restrictions for a two way anova where one of the variables is nested in the other, and making sure I understand how to enumerate the number of permutations possible with a given design.
in Anderson and ter Braak they mention that for a nested design with factor A having two levels and B within A having 3 levels, there are only 10 possible permutations for testing variable A ( MSA/ MSB(A) ) meaning the smallest p-value for testing the effect of A is 0.1
I can't figure out how to get that. When I try setting something up using the permute package, I get 5 permutations. Is it a conceptual thing I'm missing, a coding issue? What am I not getting?
# library(permute)
tmp<-data.frame(A=rep(c('A.1','A.2'),each=9),
B=rep(c(1:3),each=3),
obs.rep=rep(c(1:3),3))
ctrl.nestB<-permute::how(plots=permute::Plots(strata=tmp$B,
type = 'free'),
within = permute::Within(type='none'))
permute::allPerms(tmp,ctrl.nestB)
thanks for your help and patience
permutepackage, so you should at least havelibrary(permute). Furthermore, when I run your code I get the error:Error in Within(type = "none") : could not find function "Within". What package are you using forWithin?