Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

HWLindley

Calculate a posteriori density for Lindley's alpha


Description

Function HWLindley calculates the posterior density for disequilibrium measure alpha, as defined by Lindley (1988).

Usage

HWLindley(alphaseq = seq(-3, 3, by = 0.01), x)

Arguments

alphaseq

a single value or a sequence of values for alpha

x

the genotype count vector in format (AA,AB,BB)

Details

Numerical integration is used to compute the density.

Value

a vector with values of the density for each value in alphaseq

Author(s)

Jan Graffelman jan.graffelman@upc.edu

References

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.

See Also

Examples

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)

HardyWeinberg

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

v1.7.2
GPL (>= 2)
Authors
Jan Graffelman [aut, cre], Christopher Chang [ctb], Xavi Puig [ctb], Jan Wigginton [ctb], Leonardo Ortoleva [ctb], William R. Engels [ctb]
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.