Skip to contents

Summarize locus heterozygosity

Usage

summarize_he(
  mcmc_results,
  lower_quantile = 0.025,
  upper_quantile = 0.975,
  merge_chains = TRUE
)

Arguments

mcmc_results

Result of calling run_mcmc()

lower_quantile

The lower quantile of the posterior distribution to return

upper_quantile

The upper quantile of the posterior distribution to return

merge_chains

Merge the results of multiple chains into a single summary

Value

Data frame with one row per locus (per chain if merge_chains is FALSE) giving posterior quantiles and mean of expected heterozygosity.

Details

Summarize locus heterozygosity from the posterior distribution of sampled allele frequencies.

Examples

he_summary <- summarize_he(mcmc_results)
head(he_summary)
#>   locus post_stat_lower post_stat_med post_stat_upper post_stat_mean
#> 1    L1       0.4717457     0.5294729       0.5829252      0.5292304
#> 2    L2       0.5423829     0.5975897       0.6369124      0.5956284
#> 3    L3       0.7386658     0.7590777       0.7760437      0.7586013
#> 4    L4       0.7172998     0.7345423       0.7505065      0.7348723
#> 5    L5       0.6782498     0.7099723       0.7313276      0.7084465
#> 6    L6       0.3892243     0.4526432       0.5082795      0.4505690