[R] restricted permutations in permtest()?
Kay Cecil Cichini
Kay.Cichini at uibk.ac.at
Tue Jan 19 11:39:13 CET 2010
Hallo List,
I'm trying to implemement a restricted permutation scheme in permutest(). More
precisely I have dependence in my data that should be allowed for in the
permutation - I simulated the problem in the example of the vegan documentation
p.24:
library(vegan)
data(varespec)
## Bray-Curtis distances between samples
dis <- vegdist(varespec)
## First 16 sites grazed, remaining 8 sites ungrazed
groups <- factor(c(rep(1,16), rep(2,8)), labels = c("grazed","ungrazed"))
## Calculate multivariate dispersions
mod <- betadisper(dis, groups)
## Perform test
anova(mod)
##simulation of dependence; blocks
blocks<-factor(c(rep(1,4),rep(2,4),rep(3,4),rep(4,4)))
##the unrestricted Permutation test for F is
permutest(mod, pairwise = TRUE)
..I wasn't able to find out the right syntax for implementation of blocks, I
tried with argument strata, which would be blocks, in permutest(mod, pairwise =
TRUE, blocks) but this doesn't work. By the way, what is 'pairwise = TRUE' for?
Thanks for any help,
Kay
---------------------------------------------
Mag. Kay Cichini
Institute of Botany
Sternwartestr. 15
A-6020 Innsbruck
Tel.: +43 (0)512 507 5938
More information about the R-help
mailing list