gibbs_known | R Documentation |
Gibbs sampler under random mating with known genotypes.
gibbs_known(x, alpha, B = 10000L, T = 1000L, more = FALSE, lg = FALSE)
x |
The vector of genotype counts. x(i) is the number of individuals that have genotype i. |
alpha |
Vector of hyperparameters for the gamete frequencies. Should be length (x.length() - 1) / 2 + 1. |
B |
The number of sampling iterations. |
T |
The number of burn-in iterations. |
more |
A logical. Should we also return posterior draws ( |
lg |
Should we return the log marginal likelihood (true) or not (false). |
A list with some or all of the following elements
mx
: The estimate of the marginal likelihood
p_tilde
: The value of p used to evaluate the posterior density.
p
: The samples of the gamete frequencies
post
: The likelihood times prior evaluated at current samples.
ptilde_post
: The samples of the full conditionals of p_tilde.
David Gerard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.