Skip to contents

Summarize effective COI

Usage

summarize_effective_coi(
  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

boolean indicating that all chain results should be merged

Value

Data frame with one row per sample (per chain if merge_chains is FALSE) giving posterior quantiles and mean of effective COI, (1 - relatedness) * (COI - 1) + 1.

Details

Summarize effective COI from MCMC. Returns a dataframe that contains summaries of the posterior distribution of effective COI for each biological sample.

Examples

effective_coi_summary <- summarize_effective_coi(mcmc_results)
head(effective_coi_summary)
#>   sample_id post_effective_coi_lower post_effective_coi_med
#> 1        S1                 1.430784               1.677670
#> 2        S2                 2.066723               2.483935
#> 3        S3                 3.544077               4.082743
#> 4        S4                 4.631623               5.384832
#> 5        S5                 6.941440               8.313652
#> 6        S6                 3.369189               3.832114
#>   post_effective_coi_upper post_effective_coi_mean
#> 1                 1.953299                1.684685
#> 2                 3.034702                2.509620
#> 3                 4.937159                4.132907
#> 4                 6.239878                5.403706
#> 5                 9.791648                8.330099
#> 6                 4.457409                3.843342