SPSS command: SPSS CSLOGISTIC
Logistic regression for complex survey data
Complex Samples Logistic Regression models a categorical survey outcome — binary or multinomial — on factors and covariates, with odds ratios that describe the population and standard errors that respect strata, clusters and weights.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS CSLOGISTIC procedure on your device by pseudo-maximum likelihood, with design-based (Binder) variances, Wald tests on the design degrees of freedom, three pseudo R² measures and a weighted classification table.
- How each predictor changes the odds of a response category against the reference category, as Exp(B) with a design-based interval.
- Whether each predictor matters overall, from Wald F and Rao–Scott adjusted F tests on the design df.
- How much the design changes each coefficient's variance compared with simple random sampling (design effects).
- How well the model fits, from the pseudo −2 log likelihood and Cox and Snell, Nagelkerke and McFadden R².
When to use it
Use it when
- A yes/no survey outcome (owns a home, voted, has a condition) with predictors, in data with strata, clusters and weights.
- An unordered outcome with three or more categories (employment status, preferred brand): the model becomes baseline-category multinomial logistic.
- Reporting adjusted odds ratios from a national survey, where unweighted logistic regression would misstate both estimates and errors.
Use something else when
- An ordered outcome such as a five-point rating: Complex Samples Ordinal Regression uses the ordering and needs fewer parameters.
- A crude 2×2 comparison with no adjustment: Complex Samples Crosstabs gives the odds ratio and risks directly.
- You need stepwise selection, interactions or ROC-based diagnostics: this panel fits a main-effects model you specify.
How to run it in Crosstabs
- 01
Open your survey file
Open the .sav, CSV or Excel file in the workspace and switch to Statistics mode. The file is read in your browser and is not uploaded.
- 02
Choose the procedure
In the Complex samples group, pick Complex Samples Logistic Regression (CSLOGISTIC).
- 03
Check the saved sampling plan
The panel opens with a Sampling plan line showing the weight, strata, clusters and estimation. If no plan is saved for this dataset, open Sampling plan (CSPLAN) first. Plan variables are left out of the variable pickers, and the workspace weight is ignored: Complex Samples always use the plan's weight.
- 04
Choose the outcome and reference
Pick the Dependent variable (categorical). Under Reference category keep Last (SPSS default) or choose the category the others are compared with — for example No, so the model describes the odds of Yes.
- 05
Add predictors and run
Tick Factors (categorical) and Covariates (numeric), set the Confidence level and run. The intercept is always included; a warning appears if the estimation did not converge.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
A synthetic household survey of 120 respondents: three strata (Metro, Town, Rural), four primary sampling units (PSUs) per stratum and ten respondents per PSU, with a sampling weight that rises from about 35 in Metro to about 110 in Rural. Each PSU shares a random effect, so respondents in the same cluster resemble each other. The plan is weight + strata + clusters, with-replacement (WR) estimation; all values come from a fixed seed.
| Item | Value |
|---|---|
| Pseudo −2 log likelihood (initial) | 11207.3 |
| Pseudo −2 log likelihood (final) | 10707.8 |
| Cox and Snell R² | 0.0584 |
| Nagelkerke R² | 0.0788 |
| McFadden R² | 0.0446 |
| Unweighted cases used | 120 |
| Estimated population size | 8308.2 |
The pseudo −2 log likelihood is computed on the weighted (population) scale.
| Parameter | B | Std. Error | Sig. | Exp(B) | Exp(B) 95% CI Lower | Exp(B) 95% CI Upper |
|---|---|---|---|---|---|---|
| (Intercept) | −2.001 | 0.697 | .018 | 0.135 | 0.028 | 0.654 |
| [sex=Female] | −0.095 | 0.350 | .792 | 0.909 | 0.412 | 2.006 |
| [sex=Male]ᵃ | 0 | |||||
| age | 0.036 | 0.013 | .022 | 1.036 | 1.007 | 1.067 |
a. Set to zero because this parameter is redundant (the last category is the reference). Reference category: No. Pseudo-likelihood estimates; design-based variances by Taylor linearization of the score (Binder 1983).
| Observed | Predicted No | Predicted Yes | Percent correct |
|---|---|---|---|
| No | 4108.1 | 846.3 | 82.9 |
| Yes | 1824.7 | 1529.1 | 45.6 |
Counts are sums of the sampling weights (estimated population).
How to read it
With No as the reference category, each extra year of age multiplies the odds of owning by Exp(B) = 1.036 (95% CI 1.007 to 1.067, p = .022). The interval and the t test use the 9 design df, and the design effect of 0.85 shows how clustering changes the coefficient's variance relative to simple random sampling. Nagelkerke R² is 0.079; the classification table is in estimated population counts, with 67.9% classified correctly overall.
Output tables explained
- Model Summary
- Pseudo −2 log likelihood for the intercept-only and final models, Cox and Snell, Nagelkerke and McFadden R², unweighted cases used and the estimated population size.
- Tests of Model Effects
- Wald F, Wald chi-square and Rao–Scott Adjusted F for the intercept and each predictor; in a multinomial model each test covers the predictor's parameters across all non-reference categories.
- Parameter Estimates
- B, standard error, interval, t, df, significance and design effects, plus Exp(B) — the odds ratio — and its interval, grouped by response category in a multinomial model.
- Classification
- Observed against predicted category with percent correct, where counts are sums of the sampling weights — that is, estimated population numbers rather than cases.
Assumptions and notes
- The saved plan describes how the sample was actually drawn: the right sampling weight, the stage-1 strata and the primary sampling units (PSUs). A wrong plan gives wrong standard errors, however good the model.
- Models contain main effects only (no interaction terms). Factors use SPSS-style coding with the last category as the redundant reference; cases missing any model variable are dropped listwise but stay in the design with zero contribution.
- The log odds are linear in the covariates. The dependent variable needs at least two categories and at most 20, each with weighted cases.
- Complete or quasi-complete separation makes estimates unstable; the panel flags non-convergence instead of hiding it.
How the results are validated
On a synthetic two-stage stratified survey (235 cases) under three designs, the binary model's coefficients, standard errors and odds ratios match the R survey package's svyglm (quasibinomial) to a relative 1e-8, and its pseudo −2 log likelihoods and pseudo R² match an independent implementation of the SPSS formulas. The multinomial model is checked against an independent NumPy/SciPy pseudo-likelihood fit and sandwich variance: coefficients to 1e-8, standard errors, design effects and Wald tests to 1e-7. Validation evidence
Questions
What does pseudo-maximum likelihood mean?
The model maximizes the weighted log likelihood, which estimates the population likelihood. Because the weights are not frequencies, that likelihood is not a true likelihood, so likelihood-ratio tests are not used; inference comes from design-based Wald tests.
Why is the −2 log likelihood so large?
It is computed on the weighted scale, so it grows with the estimated population size. Compare the initial and final values with each other or read the pseudo R², not the absolute number.
Which category is the reference?
By default the last category in sorted order, as in SPSS. Choose another in Reference category; each coefficient then compares a response category with it, and for factors the last level is the reference.
Why are the classification counts not whole numbers?
They are sums of sampling weights, so they estimate how many people in the population would be classified each way, not how many respondents.
Is my survey file uploaded?
No. The workspace reads the file and runs CSLOGISTIC in your browser, and the sampling plan is stored in this browser only. Nothing is sent to Crosstabs servers, and there is no account to create.
Related procedures
- Complex Samples PlanCSPLAN
- Complex Samples CrosstabsCSTABULATE
- Complex Samples Ordinal RegressionCSORDINAL
- Binary Logistic RegressionLOGISTIC REGRESSION
- Multinomial Logistic RegressionNOMREG
- Free SPSS alternative: full coverage list
Run Complex Samples Logistic 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.