HWLindley | R Documentation |
Function HWLindley
calculates the posterior density for disequilibrium measure alpha, as defined by Lindley (1988).
HWLindley(alphaseq = seq(-3, 3, by = 0.01), x)
alphaseq |
a single value or a sequence of values for alpha |
x |
the genotype count vector in format (AA,AB,BB) |
Numerical integration is used to compute the density.
a vector with values of the density for each value in alphaseq
Jan Graffelman jan.graffelman@upc.edu
Lindley, D.V. (1988) Statistical Inference Concerning Hardy-Weinberg Equilibrium. In: Bernardo, J.M., DeGroot, M.H., Lindley, D.V. and Smith, A.F.M. Bayesian Statistics, 3, pp. 307-326. Oxford University Press.
HWPosterior
x <- c(MM=298,MN=489,NN=213) post.dens <- HWLindley(seq(-2,2,by=0.01),x) ## Not run: plot(seq(-2,2,by=0.01),post.dens,type="l") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.