geno_posterior: given some genotype likelihoods and a prior, compute the...

Description Usage Arguments Details

Description

given some genotype likelihoods and a prior, compute the posterior

Usage

1
geno_posterior(Lik, Pri, nStates)

Arguments

Lik

an array of genotype likelihoods. These will commonly be "something by N" where N is the number of individuals or marriages. In that case, the "something" will be all the possible genotype states in such an entity. (For example 9 x L for a marriage node)

Pri

prior on genotypes. I will define this vaguely for now. It must, of course correspond strucurally to Lik. For example, for marriages, one will expect it to of length 9 x L. For individuals likelihoods, 3 x L, an so forth.

nStates

Number of genotypic states at each locus. So, basically, Pri should be of length nStates * L, and Lik should be of length nStates * L * N. I could write a function that figured out what nStates was from the array dimensions, but I actually think this way is more flexible.

Details

This could all be done within Rcpp and would probably be faster that way, but I am just prototyping this at the moment.


eriqande/fullsniplings documentation built on May 16, 2019, 8:45 a.m.