estimateLogLikelihood: Multi-population log-likelihood estimation

Description Usage Arguments Details

View source: R/initMMDIT.R

Description

This computes the P(evidence|Hypothesis) for a series of alleles (allelesObserved, taken from known haplotypes and allelesThatExplain, populated from database) which together explain the evidence.

Usage

1
2
3
4
5
6
7
8
estimateLogLikelihood(
  allelesObserved,
  allelesThatExplain,
  databaseAlleles,
  databasePopulations,
  theta = NULL,
  ...
)

Arguments

allelesObserved

vector of alleles observed (empirically) (not database, may be empty)

allelesThatExplain

vector of alleles that explain the mixture

databaseAlleles

a vector of alleles sampled from the population (also from database, but may in practice come from a different sub-population)

databasePopulations

a vector of population identifiers (paired with databaseAlleles; also from database)

theta

theta-correction (Fst, taken from fst_buckleton)

...

(passed to estimateLog10LikelihoodNaive in the case that theta is null)

Details

The likelihood is estimated in multiple populations. To do so, provide parallel vectors of alleles (databaseAlleles) and the population affiliations (databasePopulations). Each are treated as categorical variables (case sensitive, either the same or different).

If a theta value is provided, the theta-corrected likelihood is estimated (see: estimateLog10LikelihoodTheta) otherwise the naive estimator is used.


Ahhgust/MMDIT documentation built on Jan. 27, 2021, 11:48 a.m.