test.within: Tests the significance of the effect of inner.level on...

Description Usage Arguments Value Author(s) Examples

Description

Tests the significance of the effect of inner.level on genetic differentiation within blocks defined by outer.level

Usage

1
test.within(data, within, test.lev, nperm, ...)

Arguments

data

a data frame containing the genotypes for the different loci

within

A vector containing the units in which to keep the observations

test.lev

A vector containing the units from which to construct the contingency tables

nperm

The number of permutations to carry out for the test

...

Mainly here to allow passing diploid=FALSE if necessary

Value

g.star

A vector containing all the generated g-statistics, the last one beeing the observed

p.val

The p-value associated with the test

Author(s)

Jerome Goudet jerome.goudet@unil.ch

Examples

1
2
3
4
data(gtrunchier)
attach(gtrunchier)
#tests whether the patch level has a significant effect on genetic structure
test.within(gtrunchier[,-c(1,2)],within=Locality,test.lev=Patch)

Example output

$g.star
  [1] 6784.752 6734.584 6823.691 6713.355 6698.171 6824.107 6712.765 6768.231
  [9] 6776.394 6709.547 6829.384 6798.843 6753.355 6783.378 6757.532 6791.996
 [17] 6802.739 6793.754 6771.824 6785.283 6759.661 6743.649 6734.674 6684.018
 [25] 6793.146 6747.092 6807.022 6728.055 6776.174 6768.494 6689.626 6801.299
 [33] 6727.653 6763.671 6783.659 6790.568 6756.044 6797.324 6854.558 6802.181
 [41] 6809.667 6702.826 6689.752 6766.403 6742.088 6703.004 6994.906 6712.487
 [49] 6779.267 6811.968 6831.024 6810.689 6718.827 6805.060 6825.624 6780.132
 [57] 6775.591 6789.473 6868.821 6834.580 6744.106 6768.493 6788.945 6739.648
 [65] 6770.113 6786.258 6809.158 6726.502 6717.489 6748.349 6773.849 6757.415
 [73] 6812.216 6816.413 6845.660 6745.170 6812.238 6728.043 6808.006 6746.701
 [81] 6899.024 6791.586 6813.860 6691.562 6745.102 6732.827 6766.087 6756.655
 [89] 6748.200 6834.348 6826.845 6810.900 6762.536 6748.837 6895.484 6739.204
 [97] 6829.135 6853.808 6779.767 7941.267

$p.val
[1] 0.01

hierfstat documentation built on Nov. 17, 2021, 5:08 p.m.