SPSS command: SPSS BAYES ANOVA

Bayesian one-way ANOVA in your browser

Bayesian one-way ANOVA compares a model in which group means differ with the intercept-only model and reports the Bayes factor between them.

Free · No account · Files stay on your device · Updated 18 October 2026

What it tells you

Crosstabs runs the SPSS BAYES ANOVA procedure on your device with four g-prior Bayes factors, the classical ANOVA table, and posterior distributions for every group mean and the error variance.

  • Whether a factor explains the outcome at all: BF10 compares the group model with the intercept-only model.
  • Evidence that all groups share one mean, through BF01 — useful when a non-significant F leaves you unsure.
  • A posterior mean and credible interval for each group mean, and for the error variance.
  • R² and the classical F test, so Bayesian and frequentist results can be reported together.

When to use it

Use it when

  • One scale outcome across three or more independent groups, such as yield by fertilizer or score by teaching method.
  • You need to argue that groups do not differ, for example equivalence of regional samples.
  • You want interval estimates for each group mean that can be read as probabilities.

Use something else when

  • Only two groups: Bayesian independent samples gives the posterior of the difference directly.
  • Several factors or covariates: use Bayesian linear regression with factors, or GLM Univariate.
  • Repeated measurements of the same people: use Bayesian repeated-measures ANOVA.

How to run it in Crosstabs

  1. 01

    Open your data

    Open the file, switch to Statistics mode and choose Bayesian one-way ANOVA in the Bayesian statistics group.

  2. 02

    Set Dependent and Factor

    Choose a numeric Dependent (scale) variable and a Factor with between 2 and 50 categories.

  3. 03

    Pick the Bayes factor

    Under Bayes factor choose JZS (Zellner–Siow), Zellner (fixed g, blank g = N), Hyper-g (a, default 3) or Rouder (scale s, default 1).

  4. 04

    Pick the prior for the posterior

    Keep Reference, p(θ, σ²) ∝ 1/σ², or choose Conjugate normal–inverse-gamma and set Shape a0, Scale b0, Prior mean and Prior variance (× σ²).

  5. 05

    Run

    Set Credible interval (%), declare any workspace weight, and press Run Bayesian one-way ANOVA. Cases missing either variable are excluded listwise.

Worked example

Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.

Try with example data

Data

30 synthetic field plots, 10 for each of three fertilizer blends (A, B, C); the outcome is yield in kilograms per plot, drawn from normal distributions with a common spread and a fixed seed.

ANOVA: yield
SourceSum of SquaresdfMean SquareFSig.
Between Groups115.99257.996.710.004
Within Groups233.35278.64
Total349.3329
Bayes Factor
NR²BF10BF01
300.3326.3970.156

JZS method (Zellner–Siow Cauchy prior), model against the intercept-only model.

Posterior Distribution Characterization for Group Means
blendPosterior modePosterior meanPosterior variance95% CrI lower95% CrI upper
A30.0730.070.93328.1631.98
B33.1833.180.93331.2735.09
C34.8134.810.93332.9036.72

Reference prior p(θ, σ²) ∝ 1/σ²; equal-tailed credible intervals.

How to read it

The classical table gives F(2, 27) = 6.71, p = .004, R² = 0.332. The JZS Bayes factor comparing the blend model with the intercept-only model shows moderate evidence for the alternative (BF10 = 6.397). The posterior table then gives a 95% credible interval for each blend's mean yield, from 30.07 kg for A to 34.81 kg for C; the omnibus factor itself does not say which blends differ.

Output tables explained

ANOVA
Between- and within-groups sums of squares, df, mean squares, F and significance for the chosen dependent variable.
Bayes Factor
N, R², BF10 and BF01 for the group model against the intercept-only model; a footnote states the g-prior method and its setting.
Posterior Distribution Characterization for Group Means
Mode, mean, variance and equal-tailed credible interval for each group mean under the reference or conjugate prior.
Posterior Distribution Characterization for Error Variance
The Inverse-Gamma posterior of the error variance, with its shape and rate in a footnote; plots show each mean and the variance.

Assumptions and notes

  • Observations are independent, and each case belongs to one group.
  • Residuals are roughly normal with a common variance across groups; there is no Welch-type option here.
  • The Bayes factor is an omnibus comparison: it does not identify which groups differ, and no post hoc comparisons are produced.

How the results are validated

The JZS and Rouder (s = 0.5) factors match 30-digit mpmath quadrature to a relative 1e-8 and R BayesFactor 0.9.12.4.8 lmBF on k − 1 dummy columns to 1e-8; Zellner and hyper-g factors match closed forms to 1e-12 and 1e-8. Group-mean and error-variance posteriors match the reference to 1e-10 (credible limits 1e-9) under both the reference and conjugate priors. Validation evidence

Questions

Why does my Bayes factor differ from JASP or anovaBF?

SPSS places a g-prior on the k − 1 coefficients of the whole model, while BayesFactor's anovaBF (used by JASP) uses a per-level fixed-effect prior with a different scale. Both are valid; they are different priors, so the numbers differ.

Which g-prior should I use?

JZS (Zellner–Siow) is a robust default. Zellner's fixed g is simple but sensitive to g; hyper-g and Rouder's scale s let you tune how large an effect the alternative expects.

How do I find which groups differ?

Compare the group-mean credible intervals, or run Bayesian independent samples on the pairs you care about. For multiplicity-adjusted pairwise tests, use One-Way ANOVA's post hoc options.

Does a frequency weight work?

Yes. A declared frequency weight with whole numbers is treated as replicated cases. Fractional weights and sampling weights are refused.

Run Bayesian One-Way ANOVA on your own data

Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.