gibbs_known {hwep} | R Documentation |
Gibbs sampler under random mating with known genotypes.
Description
Gibbs sampler under random mating with known genotypes.
Usage
gibbs_known(x, alpha, B = 10000L, T = 1000L, more = FALSE, lg = FALSE)
Arguments
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). |
Value
A list with some or all of the following elements
mx
: The estimate of the marginal likelihoodp_tilde
: The value of p used to evaluate the posterior density.p
: The samples of the gamete frequenciespost
: The likelihood times prior evaluated at current samples.ptilde_post
: The samples of the full conditionals of p_tilde.
Author(s)
David Gerard