phsc.get.pairwise.relationships.posterior: Calculate marginal posterior probability for two individuals...

View source: R/phyloscan.fun.private.R

phsc.get.pairwise.relationships.posteriorR Documentation

Calculate marginal posterior probability for two individuals being in a particular relationship state

Description

This function calculates the parameters that specify the marginal posterior probability for two individuals being in a particular relationship state. The marginal posterior is Beta distributed and this function calculates the ALPHA and BETA parameters.

Usage

phsc.get.pairwise.relationships.posterior(
  df,
  n.type = 2,
  n.obs = 3,
  n.type.dir = n.type,
  n.obs.dir = n.obs,
  confidence.cut = 0.5
)

Arguments

df

Input data.table

n.type

Calibration parameter for the prior: minimum number of windows of state to select a pair of individuals with confidence of at least at least confidence.cut, if the total number of windows is n.obs

n.obs

Calibration parameter for the prior: total number of windows.

confidence.cut

Calibration parameter for the prior: confidence cut off.

Value

Input data.table with two additional columns POSTERIOR_ALPHA and POSTERIOR_BETA


olli0601/Phyloscanner.R.utilities documentation built on April 16, 2024, 5:44 a.m.