SPSS command: SPSS BAYES REGRESSION
Bayesian linear regression in your browser
Bayesian linear regression estimates how an outcome depends on several predictors and gives a full posterior distribution for every coefficient, plus a Bayes factor for the model against the intercept-only model.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS BAYES REGRESSION procedure on your device with scale covariates and indicator-coded factors, four g-prior Bayes factors and a choice of reference or conjugate prior.
- How strongly the data favour the full model over an intercept-only model (BF10), alongside R, R² and adjusted R².
- A posterior mode, mean, variance and credible interval for the intercept and every coefficient.
- The posterior of the error variance, a direct statement of how much unexplained spread remains.
- How prior information about coefficient size changes the estimates, via the conjugate prior.
When to use it
Use it when
- A scale outcome predicted by several scale or categorical predictors, such as rent from area, distance and district.
- You want coefficient intervals that can be read as probabilities, or want to incorporate prior estimates.
- You need evidence that a set of predictors is useless (large BF01), not just a non-significant F.
Use something else when
- A binary or count outcome: use binary logistic regression or generalized linear models.
- You need per-predictor Bayes factors or model averaging: the panel reports one Bayes factor for the whole model.
- Stepwise variable selection, residual diagnostics or collinearity statistics: use Linear Regression.
How to run it in Crosstabs
- 01
Open your data
Open the file, switch to Statistics mode and choose Bayesian linear regression in the Bayesian statistics group.
- 02
Set the model
Choose the Dependent (scale) variable, tick scale predictors under Covariates (scale), and tick categorical predictors under Factors (indicator-coded, last category as reference).
- 03
Pick the Bayes factor
Under Bayes factor choose JZS (Zellner–Siow), Zellner (fixed g, blank g = N), Hyper-g with parameter a, or Rouder with scale s.
- 04
Pick the prior for the coefficients
Keep Reference, p(θ, σ²) ∝ 1/σ², or choose Conjugate normal–inverse-gamma with Shape a0, Scale b0, a common Prior mean and Prior variance (× σ²) for every coefficient.
- 05
Run
Set Credible interval (%), declare any workspace weight, and press Run Bayesian linear regression. Missing values are excluded listwise.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
40 synthetic apartments with floor area in square metres, distance to the city centre in kilometres and monthly rent, generated from a linear model with noise and a fixed seed.
| N | R | R² | Adjusted R² | Std. Error of the Estimate | BF10 |
|---|---|---|---|---|---|
| 40 | 0.865 | 0.749 | 0.735 | 154.76 | 1.718e+9 |
JZS method (Zellner–Siow Cauchy prior), model against the intercept-only model.
| Parameter | Posterior mode | Posterior mean | Posterior variance | 95% CrI lower | 95% CrI upper |
|---|---|---|---|---|---|
| (Intercept) | 491.67 | 491.67 | 13766.945 | 260.45 | 722.90 |
| area | 14.84 | 14.84 | 2.550 | 11.70 | 17.99 |
| distance | −33.93 | −33.93 | 80.698 | −51.63 | −16.23 |
Reference prior p(θ, σ²) ∝ 1/σ²; equal-tailed credible intervals.
| Parameter | Posterior mode | Posterior mean | 95% CrI lower | 95% CrI upper |
|---|---|---|---|---|
| Error variance | 22723.2 | 25320.1 | 15919.5 | 40089.6 |
Posterior Inverse-Gamma(18.5, 443103); its variance column is omitted here for width.
How to read it
The two predictors explain 74.9% of the variation in rent (R² = 0.749), and the JZS Bayes factor against the intercept-only model shows extreme evidence for the alternative (BF10 = 1.718e+9). Each extra square metre adds about 14.84 to the rent (95% credible interval 11.70 to 17.99); each kilometre from the centre changes it by −33.93 (−51.63 to −16.23). Under the reference prior these intervals coincide numerically with classical confidence intervals but carry the direct probability reading.
Output tables explained
- Model Summary
- N, R, R², adjusted R², standard error of the estimate, and BF10/BF01 for the model against the intercept-only model.
- ANOVA
- Regression and residual sums of squares, df, mean squares, F and significance from the least-squares fit.
- Bayesian Estimates of Coefficients
- Posterior mode, mean, variance and equal-tailed credible interval for the intercept, each covariate and each factor indicator (named factor=level).
- Bayesian Estimates of Error Variance
- The Inverse-Gamma posterior of σ² with mode, mean, variance and credible interval; plots show every coefficient and the variance.
Assumptions and notes
- The outcome is linearly related to the predictors, with independent, roughly normal errors of constant variance.
- Predictors are not perfectly collinear; a singular design is reported instead of estimated.
- Factors are indicator-coded with the last category as reference, so each factor coefficient is a difference from that category.
How the results are validated
On a reference model with two covariates and a three-level factor, 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 to 1e-8, Zellner and hyper-g factors match to 1e-12 and 1e-8, and coefficient posteriors match to 1e-10 (credible limits 1e-9) under both priors. A frequency-weighted fit matches BayesFactor on replicated rows to 1e-8. Validation evidence
Questions
Are the credible intervals different from confidence intervals?
Under the reference prior they are numerically equal to the classical t intervals, but they can be read directly as a 95% probability that the coefficient lies in the range. A conjugate prior pulls them toward the prior mean.
Why is the Bayes factor so large?
With a strong fit and a moderate N the evidence accumulates quickly; values above 10 000 are shown in scientific notation. Anything above 100 is conventionally called extreme evidence.
Does it test each predictor separately?
No. The Bayes factor compares the full model with the intercept-only model. Judge individual predictors by whether their credible intervals exclude zero, or compare two models by running each and dividing their BF10 values.
Which category is the reference for a factor?
The last category in sort order, as in SPSS. Recode the variable if you want a different baseline.
Is my data uploaded?
No. The model is fitted in a Web Worker in your browser and the data stays on your device.
Related procedures
- Linear RegressionREGRESSION
- Bayesian One-Way ANOVABAYES ANOVA
- Bayesian Pearson CorrelationBAYES CORRELATION
- Weight Estimation (WLS)WLS
- GLM UnivariateUNIANOVA
- Free SPSS alternative: full coverage list
Run Bayesian Linear Regression 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.