gl.test.heterozygosity: Tests the difference in heterozyosity between populations taken pairwise.
Description
Calculates the expected heterozygosities for each population in a genlight object,
and uses re-randomization to test the statistical significance of differences
in heterozyosity between populations taken pairwise.
-- a genlight object containing the SNP genotypes [Required]
nreps
-- number of replications of the re-randomization [10,000]
alpha1
-- significance level for comparison with diff=0 on plot [0.05]
alpha2
-- second significance level for comparison with diff=0 on plot [0.01]
plot
-- if TRUE, plots a sampling distribution of the differences for each comparison [FALSE]
plot.out
-- if TRUE, outputs the plots as jpeg [FALSE]
verbose
-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]
Value
returns a dataframe containing population labels, heterozygosities and sample sizes
Details
Optionally plots the sampling distribution for the difference between each pair
of heterozygosities, marked with the critical limits alpha1 and alpha2, the observed
heterozygosity, and the zero value (if in range). Can output the plots to jpeg.