Learn R Programming

qbrms (version 1.0.1)

bayesfactor: Bayesian Hypothesis Testing (very simple approximations)

Description

Compute a crude Bayes factor for a point, interval, or comparison hypothesis using approximate posterior draws recovered from a qbrms_fit. This is deliberately simple and intended for exploratory use.

Usage

bayesfactor(
  object,
  hypothesis,
  prior = NULL,
  null = 0,
  direction = "two-sided",
  rope = NULL,
  nsim = 4000,
  verbose = TRUE
)

Value

An object of class qbrms_bayesfactor.

Arguments

object

A qbrms_fit object.

hypothesis

Character string, for example "Intercept > 0", "b_x = 0", or "b_x > 0.2".

prior

Optional prior information (unused here, kept for API compatibility).

null

Numeric null value for point tests (default 0).

direction

One of "two-sided", "greater", "less" (kept for API compatibility).

rope

Optional numeric length-2 vector c(lower, upper) to define a ROPE for point tests.

nsim

Number of posterior draws to simulate from the fitted summary.

verbose

Logical; print progress information.