Gibbs sampler under random mating with known genotypes.
gibbs_known(x, alpha, B = 10000L, T = 1000L, more = FALSE, lg = FALSE)
The vector of genotype counts. x(i) is the number of individuals that have genotype i.
Vector of hyperparameters for the gamete frequencies. Should be length (x.length() - 1) / 2 + 1.
The number of sampling iterations.
The number of burn-in iterations.
A logical. Should we also return posterior draws (TRUE
)
or not (FALSE
).
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.