Learn R Programming

BayesPower (version 1.0.1)

BF10.t.test.two_sample: Bayes factor for two-sample Bayesian t-test

Description

Calculate the Bayes factor (BF10) for a two-sample Bayesian t-test, either against a point null or an interval null hypothesis.

Usage

BF10.t.test.two_sample(
  tval,
  N1,
  N2,
  model,
  location,
  scale,
  dff,
  hypothesis,
  e = NULL
)

Value

The Bayes factor (BF10) for the two-sample t-test.

Arguments

tval

Observed t-value from the two-sample t-test.

N1

Sample size of group 1.

N2

Sample size of group 2.

model

Statistical model of the analysis prior under the alternative hypothesis: Normal distribution ("Normal"), Normal moment ("NLP"), or scaled t ("t-distribution").

location

Location parameter for the analysis prior under the alternative hypothesis.

scale

Scale parameter for the analysis prior under the alternative hypothesis.

dff

Degrees of freedom for the analysis prior under the alternative hypothesis (if applicable).

hypothesis

The hypothesis being tested: two-sided ("!="), right-sided (">"), or left-sided ("<").

e

Optional numeric vector specifying bounds for an interval null; used if interval BF is calculated.

Examples

Run this code
BF10.t.test.two_sample(
  tval = 2.1,
  N1 = 30,
  N2 = 30,
  model = "t-distribution",
  location = 0,
  scale = 0.707,
  dff = 1,
  hypothesis = "!="
)

Run the code above in your browser using DataLab