Correlation & Regression
This page covers the Correlate, Regression, General Linear Model and Linear Mixed Model menu groups — everything for measuring association between variables and modelling an outcome from predictors.
Correlate
Analyze → Correlate.
Bivariate
When. Measure the strength and direction of association between scale (or ordinal) variables.
Dialog. Move two or more variables into Variables; choose the coefficient(s): Pearson (linear), Spearman or Kendall's tau-b (rank). The Options section sets one- vs two-tailed significance and the missing-data policy (pairwise default, or listwise).
Output. A correlation matrix of coefficients with significance and the N behind each cell.
Example. BMI, SystolicBP, FastingGlucose_mmolL — do they move together?
Partial
When. Measure the association between two variables controlling for one or more others.
Dialog. The two variables plus the controlling variables. (Partial correlation is inherently listwise — it needs cases complete on all variables.)
Output. The partial correlation coefficient(s) with significance.
Regression
Analyze → Regression. Model one outcome from one or more predictors. Pick the member that matches your outcome type:
| Outcome | Procedure |
|---|---|
| Continuous | Linear (OLS) |
| Continuous, positive and skewed (costs, durations) | Gamma |
| Binary (yes/no) | Binary Logistic (logit, probit or cloglog link) |
| Count | Poisson or Negative Binomial |
| Unordered categories | Multinomial |
| Ordered categories | Ordinal |
Linear
Dialog. A Dependent scale variable and one or more Independent variables. Options include:
- Robust standard errors (HC0/HC1/HC3 sandwich estimators);
- Forward / backward stepwise variable selection;
- casewise influence diagnostics — Cook's distance and leverage;
- diagnostic plots — a Residuals vs Fitted scatter and a Normal Q-Q plot of the standardized residuals, the two pictures a linearity/homoscedasticity and normality check calls for;
- save predicted values and residuals back as new variables.
Output. The model summary (R², adjusted R², standard error), the ANOVA of the regression, and the coefficients table (B, standard error, beta, t, significance, and confidence intervals).
Example. Predict SystolicBP from Age, BMI and Weight_kg.
Binary Logistic
For a yes/no outcome (e.g. Hypertensive). A Link option chooses how the probability relates to the predictors: Logit (the default — coefficients are log-odds and report Exp(B) odds ratios with confidence intervals), Probit (a normal latent variable) or Complementary log-log (an asymmetric link suited to rare events). Logit reports odds ratios; probit and cloglog report coefficients on the link scale with a Wald interval. Optional robust standard errors and forward/backward selection.
Poisson / Negative Binomial
For counts (e.g. a count of events). Negative Binomial adds an estimated dispersion parameter for over-dispersed counts. Both report rate ratios.
Gamma
For a strictly positive, right-skewed continuous outcome — costs, durations, concentrations — where the spread grows with the mean. A Link option offers the Log link (the default — a multiplicative model whose Exp(B) is the factor change in the mean per unit predictor) or the canonical Inverse link. Reports the coefficients, an estimated dispersion φ (so the standard errors account for the scale), and a deviance / Pearson goodness-of-fit table.
Multinomial / Ordinal
For categorical outcomes with three or more levels — unordered (Multinomial, baseline-category logit) or ordered (Ordinal, proportional-odds). Both report the per-category/threshold coefficients and significance.
Mediation
Asks how an independent variable X affects an outcome Y — how much of
its effect runs through one or more mediators M (the path X → M → Y) versus
directly. Pick the Outcome (Y), the Independent (X), one or more parallel
Mediators, and any Covariates entered into every model. It fits, by OLS,
the mediator model(s) M ~ X for the a path, the outcome model
Y ~ X + M for the b paths and the direct effect c′, and the total
model Y ~ X for the total effect c (with c = c′ + Σ a·b).
Two tables come back: the path coefficients with standard errors, t and
confidence intervals; and the indirect effect(s) — each a·b, plus a total
indirect when there is more than one mediator. Because the indirect effect is a
product of coefficients (its sampling distribution is skewed), its interval
comes from a nonparametric bootstrap — Percentile or BCa — over
B resamples, reproducible for a fixed Seed. An indirect interval that
excludes zero is the evidence of mediation. The bootstrap is unweighted (a
Weight Cases variable is noted, not applied); Select Cases and Split File are
honored.
Scope (v1): a continuous outcome, single or parallel mediators. Moderated mediation (a moderator and simple slopes) and serial mediators are not in this version.
General Linear Model
Analyze → General Linear Model. A factorial between-subjects ANOVA / ANCOVA with Type III sums of squares: several factors, their interactions, and optional continuous covariates. Add post-hoc comparisons and contrasts as in One-Way ANOVA.
Example. SystolicBP by Sex and SmokingStatus (and their interaction), adjusting for Age as a covariate.
Linear Mixed Model
Analyze → Linear Mixed Model. For clustered or repeated data: a model with a random intercept and optional random slopes, using variance-components or unstructured covariance, estimated by ML or REML. Reports fixed effects and the estimated variance components.
The within-subjects / multivariate family
Also under the modelling menus:
- Repeated Measures ANOVA — for a factor measured several times on the same cases, with Mauchly's test of sphericity and the Greenhouse-Geisser / Huynh-Feldt corrections.
- One-Way MANOVA — several dependent variables at once, reporting Pillai's trace, Wilks' lambda, Hotelling-Lawley and Roy's largest root.
Weighting. Repeated Measures ANOVA (its within-subjects partition) and MANOVA honour the Weight Cases setting: the case weight is a frequency weight, so a weight-2 case counts exactly as two — in the within-subjects sums of squares and the error/hypothesis scatter matrices alike.
Choosing among them
- One outcome, continuous → Linear.
- One outcome, categorical → the matching Logistic / Poisson / Multinomial / Ordinal member.
- Several categorical factors (± covariates) on one continuous outcome → GLM.
- Repeated or clustered structure → Mixed or Repeated Measures.
- Several outcomes together → MANOVA.
See Correlation vs regression if you are unsure whether you want association or prediction.