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
- 01
Open your data
Open the file, switch to Statistics mode and choose Bayesian one-way ANOVA in the Bayesian statistics group.
- 02
Set Dependent and Factor
Choose a numeric Dependent (scale) variable and a Factor with between 2 and 50 categories.
- 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).
- 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 (× σ²).
- 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.
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.
| Source | Sum of Squares | df | Mean Square | F | Sig. |
|---|---|---|---|---|---|
| Between Groups | 115.99 | 2 | 57.99 | 6.710 | .004 |
| Within Groups | 233.35 | 27 | 8.64 | ||
| Total | 349.33 | 29 |
| N | R² | BF10 | BF01 |
|---|---|---|---|
| 30 | 0.332 | 6.397 | 0.156 |
JZS method (Zellner–Siow Cauchy prior), model against the intercept-only model.
| blend | Posterior mode | Posterior mean | Posterior variance | 95% CrI lower | 95% CrI upper |
|---|---|---|---|---|---|
| A | 30.07 | 30.07 | 0.933 | 28.16 | 31.98 |
| B | 33.18 | 33.18 | 0.933 | 31.27 | 35.09 |
| C | 34.81 | 34.81 | 0.933 | 32.90 | 36.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.
Related procedures
- One-Way ANOVAONEWAY
- Bayesian Independent SamplesBAYES INDEPENDENT
- Bayesian Linear RegressionBAYES REGRESSION
- Bayesian Repeated-Measures ANOVABAYES REPEATED
- Kruskal-Wallis TestNPAR TESTS /K-W
- Free SPSS alternative: full coverage list
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.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.