R: Standard Bayes Factor for the Hardy-Weinebrg Testing Problem
hwe.bf
R Documentation
Standard Bayes Factor for the Hardy-Weinebrg Testing Problem
Description
This function provides the calculations for obtaining the standard Bayes factor for the Hardy-Weinberg testing problem. It implements a common default prior (constant) for both the null and the alternative models.
Usage
hwe.bf(y)
Arguments
y
an object of class "HWEdata".
Value
hwe.bf returns the standard Bayes Factor value for the Hardy-Weinberg testing problem (see the references for the details).
Note
The Bayes factor computed here is for the unrestricted model (M_1) against the Hardy-Weinberg case (M_0).
# Example 1 #
data(GuoThompson8)
plot(GuoThompson8)
hwe.bf(GuoThompson8)
# Example 2 #
data(LouisDempster)
plot(LouisDempster)
hwe.bf(LouisDempster)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(HWEintrinsic)
Package HWEintrinsic (1.2.2) loaded.
To cite, see citation("HWEintrinsic")
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HWEintrinsic/hwe.bf.Rd_%03d_medium.png", width=480, height=480)
> ### Name: hwe.bf
> ### Title: Standard Bayes Factor for the Hardy-Weinebrg Testing Problem
> ### Aliases: hwe.bf
> ### Keywords: Bayes Factor Hardy-Weinberg HWE
>
> ### ** Examples
>
> # Example 1 #
> data(GuoThompson8)
> plot(GuoThompson8)
> hwe.bf(GuoThompson8)
[1] 0.02741726
>
> # Example 2 #
> data(LouisDempster)
> plot(LouisDempster)
> hwe.bf(LouisDempster)
[1] 13.49609
>
>
>
>
>
> dev.off()
null device
1
>