SinglefPrior {HWEBayes} | R Documentation |
Function to sample from the single f prior, that is the Dirichlet and normal on λ, where λ=log((f-f_{min})/(1-f)).
SinglefPrior(nsim, alpha, lambdamu, lambdasd)
nsim |
number of simulations from prior |
alpha |
vector of k parameters for the Dirichlet prior on the k allele frequencies. |
lambdamu |
mean of the normal prior on λ. |
lambdasd |
standard deviation of the normal prior on λ. |
p |
sample for vector of k allele frequencies |
f |
sample of f parameters |
lgts |
samples for logits of baseline logits |
lambda |
samples for λ |
Jon Wakefield (jonno@u.washington.edu)
Wakefield, J. (2009). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics.
SinglefReject
, HWEsimdat
SinglefSamp <- SinglefPrior(nsim=1000,alpha=c(1,1,1,1), lambdamu=-2.95,lambdasd=1.07)