Hierpertest: Test the significance among aggregates (regions,...

Description Usage Arguments Value Author(s) References Examples

View source: R/Hierpertest.R

Description

Permutation test of the significance among aggregates,e.g., test the significance of the allelic differentiation within ecosystem among different regions

Usage

1
Hierpertest(f, ncode, level, permutations)

Arguments

f

Input file, genepop format

ncode

Genotype coding type, whether 2 digital or 3 digital

level

The hierarchical level you want to test

permutations

permutations

Value

pertest

Permutation test result for the level you specified

Author(s)

qinxinghu@gmail.com

References

Anderson, M. J. (2014). Permutational multivariate analysis of variance (PERMANOVA). Wiley StatsRef: Statistics Reference Online, 1-15.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# example genepop file
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
region1=paste("region",rep(1,time=6))
region2=paste("region",rep(2,time=6))
region3=paste("region",rep(3,time=2))
region4=paste("region",rep(4,time=2))

level1=data.frame(matrix(data=0,nrow=16,ncol=1))
level1[1:6,1]=region1
level1[7:12,1]=region2
level1[13:14,1]=region3
level1[15:16,1]=region4
colnames(level1)=c("region")

hiertest=Hierpertest(infile,ncode=3,level1$region,permutations=999)
hiertest

HierDpart documentation built on March 31, 2021, 5:09 p.m.