Learn R Programming

HierDpart (version 1.5.0)

pwag.permutest: Permutation test for allelic differentiation (Delta D) among subaggregates within aggregate

Description

This test examines the allelic differentiation (Delta D) among subaggregates within aggregate. The permutation works on the pairwise allelic differentiation between subaggregates within different aggregates.

Usage

pwag.permutest(f, ncode, group, permutations)

Arguments

f

Genepop file

ncode

The number coding genotypes

group

The group or level of the aggregates

permutations

Number of permutations

Value

pwpermutest.detail

Permutation test detail of the pairwise difference between aggregates

pwtest.aggregate

Pairwise permutation P-value between aggregates

%% ...

References

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

Examples

Run this code
# NOT RUN {
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")
pwag.permutest(infile, ncode=3, group=level1$region, permutations=999)
# }

Run the code above in your browser using DataLab