Learn R Programming

HardyWeinberg (version 1.7.8)

HWLindley.cri: Calculate a credible interval for Lindley's alpha for HWE,

Description

Function HWLindley.cri calculates a Bayesian credible interval using Lindley's posterior density for equilibrium paramater alpha.

Usage

HWLindley.cri(x, verbose = TRUE, limits = c(0.025, 0.975))

Value

a vector with the lower and upper limit of the credible interval

Arguments

x

a vector of three genotype counts in order (AA,AB,BB).

verbose

print output (verbose=TRUE) or be silent

limits

upper and lower probability limits of the interval

Author

Jan Graffelman jan.graffelman@upc.edu

Details

The limits are found by numerical integration over Lindley's density.

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.

Graffelman, J. (2020) Statistical tests for the Hardy-Weinberg equilibrium. Wiley StatsRef: Statistics Reference Online tools:::Rd_expr_doi("10.1002/9781118445112.stat08274").

See Also

HWLindley, HWPosterior,

Examples

Run this code
#
# MN blood group data
#
x <- c(MM=298,MN=489,NN=213)
#
# credible interval of 95%
#
HWLindley.cri(x)
#
# credible interval of 90%
#
HWLindley.cri(x,limits=c(0.05,0.95))

Run the code above in your browser using DataLab