alphaContrastTest: Test for differences in alpha diversity between two data sets

Description Usage Arguments Value Note References See Also Examples

View source: R/diversityTests-divtable.R

Description

The null hypothesis for this tests is that there is no difference in alpha diversity between the two sets of datasets sites represented in tab.a and tab.b, or adt.a and adt.b. The method for the initial class divtable version of this was described in Scofield et al. (2012), while that for the allelic extension as class link{allele_divtables} was described in Sork et al. (In press).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'divtable'
alphaContrastTest(tab.a, tab.b, zero.div.adjust = TRUE,
  n.resample = 10000, method = c("bootstrap", "permute"),
  test.quantiles = c(0.001, 0.01, 0.05, 0.1, 0.5, 0.9, 0.95, 0.99, 0.999))

## Default S3 method:
alphaContrastTest(tab.a, tab.b, ...)

## S3 method for class 'allele_divtables'
alphaContrastTest(adt.a, adt.b,
  zero.div.adjust = TRUE, n.resample = 10000, method = c("bootstrap",
  "permute"), test.quantiles = c(0.001, 0.01, 0.05, 0.1, 0.5, 0.9, 0.95, 0.99,
  0.999))

Arguments

tab.a

Site-by-source table of class divtable

tab.b

Site-by-source table of class divtable

zero.div.adjust

Logical, if TRUE (the default), then groups with 0 within-group diversity are assigned a minimum diversity which is half the empirical diversity possible given the group size

n.resample

Number of iterations for creation of the null distribution

method

"bootstrap" or "permute", whether to create null distribution iterations with ("bootstrap") or without ("permute") replacement

adt.a

Allelic diversity dataset of class allele_divtables

adt.b

Allelic diversity dataset of class allele_divtables

Value

An diversity_test object with the result of the test

Note

adt.a and adt.b must contain the same loci

References

Scofield, D. G., Smouse, P. E., Karubian, J. and Sork, V. L. (2012) Use of alpha, beta and gamma diversity measures to characterize seed dispersal by animals. American Naturalist 180:719-732.

Sork, V. L., Smouse, P. E., Grivet, D. and Scofield, D. G. (In press) Impact of asymmetric male and female gamete dispersal on allelic diversity and spatial genetic structure in valley oak (Quercus lobata N\'ee). Evolutionary Ecology.

See Also

alphaDiversityTest, alphaContrastTest3

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Comparing alpha diversity between two different sites:
##
data(granaries_2002_Qlob)
data(granaries_2004_Qlob)
par(mfcol = c(2, 1))
membershipPlot(granaries_2002_Qlob)
membershipPlot(granaries_2004_Qlob)
alphaContrastTest(granaries_2002_Qlob, granaries_2004_Qlob)

## Comparing allele diversity between two different samples:
##
# dat1 <- readGenalex("file-of-genotypes-sample-1.txt")
# dat2 <- readGenalex("file-of-genotypes-sample-2.txt")
# gt1 <- createAlleleTables(dat1)
# gt2 <- createAlleleTables(dat2)
# alpha.contrast <- alphaContrastTest(gt1, gt2)

douglasgscofield/dispersalDiversity documentation built on March 30, 2021, 9:50 a.m.