Learn R Programming

BayesPower (version 1.0.1)

BF10.props: Bayes factor for a Bayesian test of two proportions

Description

Calculate the Bayes factor (BF10) for comparing two proportions using a Bayesian framework.

Usage

BF10.props(a0, b0, a1, b1, a2, b2, n1, n2, x1, x2)

Value

The Bayes factor (BF10) for comparing two proportions.

Arguments

a0

Alpha parameter of the beta distribution under the null hypothesis.

b0

Beta parameter of the beta distribution under the null hypothesis.

a1

Alpha parameter of the analysis beta prior distribution for group 1 under the alternative hypothesis.

b1

Beta parameter of the analysis beta prior distribution for group 1 under the alternative hypothesis.

a2

Alpha parameter of the analysis beta prior distribution for group 2 under the alternative hypothesis.

b2

Beta parameter of the analysis beta prior distribution for group 2 under the alternative hypothesis.

n1

Sample size for group 1.

n2

Sample size for group 2.

x1

Observed number of successes for group 1.

x2

Observed number of successes for group 2.

Examples

Run this code
BF10.props(
  a0 = 2, b0 = 3,
  a1 = 2, b1 = 3,
  a2 = 2, b2 = 3,
  n1 = 50, n2 = 60,
  x1 = 25, x2 = 30
)

Run the code above in your browser using DataLab