Learn R Programming

BayesPower (version 1.0.1)

BF10.t.test.one_sample: Bayes factor for one-sample Bayesian t-test

Description

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

Usage

BF10.t.test.one_sample(
  tval,
  df,
  model,
  location,
  scale,
  dff,
  hypothesis,
  e = NULL
)

Value

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

Arguments

tval

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

df

Degrees of freedom for the t-test.

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.one_sample(
  tval = 2.31,
  df = 29,
  model = "t-distribution",
  location = 0,
  scale = 0.707,
  dff = 1,
  hypothesis = "!="
)

Run the code above in your browser using DataLab