Learn R Programming

BayesPower (version 1.0.2)

BF10.f.test: Bayes Factor for a Bayesian F-Test

Description

Computes the Bayes factor (BF10) for an F-test, comparing a full model to a reduced model under either an effect-size prior or a Moment prior. Optionally, an interval null hypothesis can be specified.

Usage

BF10.f.test(fval, df1, df2, dff, rscale, f_m, prior_analysis, ROPE = NULL)

Value

A list of class "BFvalue_f" containing:

fval

Input F-value.

df1, df2

Degrees of freedom.

ROPE

Interval bound (if specified).

analysis_h1

List containing the analysis prior specification, including the prior distribution, the scale rscale, f f_m, and degrees of freedom dff.

bf10

The computed Bayes factor.

p.value

p-value.

Arguments

fval

Numeric scalar. Observed F statistic (must be at least 0).

df1

Numeric scalar. Numerator degrees of freedom (must be > 0).

df2

Numeric scalar. Denominator degrees of freedom (must be > 0).

dff

Numeric scalar. Degrees of freedom for the analysis prior under the alternative hypothesis. For the Moment prior, this must be \(\ge 3\).

rscale

Numeric scalar. Scale parameter for the effect-size prior (only used when prior_analysis = "effectsize").

f_m

Numeric scalar. Cohen's f effect-size parameter for the analysis prior.

prior_analysis

character. Analysis prior under the alternative hypothesis. Must be either "effectsize" or "Moment".

ROPE

Numeric scaler. Optional numeric scalar specifying an upper bound for an interval null hypothesis. If provided, must be > 0.

Examples

Run this code
BF10.f.test(
  fval = 4.5,
  df1 = 2,
  df2 = 12,
  dff = 12,
  rscale = 0.707,
  f_m = 0.1,
  prior_analysis = "effectsize"
)

Run the code above in your browser using DataLab