SPSS command: SPSS CSTABULATE
Survey crosstabs with Rao–Scott adjusted tests
Complex Samples Crosstabs estimates population counts and row, column and table percentages from a weighted, stratified or clustered survey, and tests association with a chi-square that is corrected for the design.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS CSTABULATE procedure on your device: one-way frequency tables or two-way crosstabs, Rao–Scott second-order adjusted Pearson and likelihood-ratio F tests, and odds ratios, relative risks and risk differences for 2×2 tables.
- The estimated population size in each cell and margin, with a design-based standard error and design effect.
- Row, column and table percentages with confidence intervals on the logit scale, which stay inside 0–100%.
- Whether two variables are associated in the population, from Rao–Scott adjusted Pearson and likelihood-ratio F tests on the design df.
- For a one-way table, whether all categories have equal population shares (test of homogeneity).
- For a 2×2 table, the odds ratio, relative risks and risk differences with design-based intervals.
When to use it
Use it when
- Weighted survey percentages for a single question, such as vote intention or service use, with margins of error that reflect clustering.
- Testing whether an outcome differs between groups in a stratified or clustered survey, where an ordinary chi-square would be too liberal.
- Comparing the risk of a binary outcome between two groups in survey data, with design-based odds ratios and risk differences.
Use something else when
- Banner tables with many columns, significance letters and export to a report: build them in Analyze mode, where saved tables can also use a complex design.
- More than two variables at once (layers or control variables): CSTABULATE here crosses one row and one optional column variable.
- Adjusting an association for other predictors: use Complex Samples Logistic Regression.
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 Frequencies and Crosstabs (CSTABULATE).
- 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 table variables
Pick the Row variable and, for a crosstab, the Column variable (optional). Each may have up to 25 categories; leave the column empty for a one-way frequency table.
- 05
Set the confidence level and run
Choose the Confidence level (90%, 95% or 99%) and run. Cases missing a table variable contribute zero but stay in the design.
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. The table crosses agegroup (45+ / Under 45) with owner (No / Yes).
| agegroup | owner | Estimate | Std. Error | 95% CI Lower | 95% CI Upper | Design Effect | Unweighted Count |
|---|---|---|---|---|---|---|---|
| 45+ | No | 51.2 | 9.1 | 31.5 | 70.5 | 2.018 | 30 |
| 45+ | Yes | 48.8 | 9.1 | 29.5 | 68.5 | 2.018 | 29 |
| Under 45 | No | 68.2 | 8.7 | 46.3 | 84.2 | 2.100 | 42 |
| Under 45 | Yes | 31.8 | 8.7 | 15.8 | 53.7 | 2.100 | 19 |
Percentages are linearised ratios of estimated totals; their confidence intervals use the logit transformation.
| Item | Chi-Square | Adjusted F | df1 | df2 | Sig. |
|---|---|---|---|---|---|
| Adjusted Pearson | 3.600 | 2.490 | 1.00 | 9.00 | .149 |
| Adjusted likelihood ratio | 3.623 | 2.505 | 1.00 | 9.00 | .148 |
Rao–Scott second-order adjusted F: X² / tr(Δ) on (d, d·ν) df, with Δ the generalized design-effect matrix of the interaction contrasts.
| Item | Estimate | Std. Error | 95% CI Lower | 95% CI Upper |
|---|---|---|---|---|
| Odds ratio | 0.489 | 0.223 | 0.174 | 1.372 |
| Relative risk (first column) | 0.751 | 0.139 | 0.493 | 1.143 |
| Relative risk (second column) | 1.535 | 0.433 | 0.810 | 2.907 |
| Risk difference (first column) | −0.170 | 0.106 | −0.409 | 0.069 |
| Risk difference (second column) | 0.170 | 0.106 | −0.069 | 0.409 |
Ratios use log-transformed confidence intervals; risk differences use untransformed intervals. Risks compare the first row (45+) with the second row (Under 45); the first column is owner = No.
How to read it
An estimated 48.8% of people aged 45+ own their home, against 31.8% of those under 45. The uncorrected Pearson chi-square of 3.60 is not referred to a χ² table: the Rao–Scott adjustment divides it by the design effects and refers it to F(1.00, 9.00) on the design df, giving F = 2.490, p = .149. The odds ratio of 0.49 (95% CI 0.17 to 1.37) compares the odds of owner = No in the 45+ row with the Under 45 row.
Output tables explained
- Population Size
- Estimated population count for every cell, row total, column total and the grand total, with standard error, confidence interval, coefficient of variation, design effect and unweighted count.
- Row % / Column % / Table %
- Percentages as linearized ratios of estimated totals, with logit-transformed confidence intervals and design effects. A one-way table shows a single Percent table.
- Tests of Independence
- Adjusted Pearson and Adjusted likelihood ratio rows: the uncorrected chi-square, the Rao–Scott adjusted F on (d, d·ν) df, and its significance. A one-way table shows the Test of Homogeneity instead.
- Odds Ratios and Risks
- For 2×2 tables only: the odds ratio, relative risks and risk differences for the first and second columns, comparing the first row with the second. Ratios use log-scale intervals.
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.
- The sampling weight is used for estimation and the variance comes from the design; the weight is never treated as a frequency weight that replicates cases. Cases with a missing or non-positive weight, or a missing design variable, are excluded from the design.
- The adjusted F tests are large-sample approximations that rely on the design df; with very few PSUs, or cells with almost no cases, treat p values as rough.
- Odds ratios and risks are computed only when all four cells of a 2×2 table have a positive estimated count.
How the results are validated
On a synthetic two-stage stratified survey (235 cases) under three designs, population sizes, cell totals, table and row proportions and their standard errors match the R survey package (svytotal, svymean, svyby) to a relative 1e-9; the two-way Rao–Scott F matches svychisq (statistic to 1e-9, p to 1e-8), and the 2×2 odds ratio, relative risks and risk differences match svycontrast. Design effects, logit intervals, the one-way homogeneity test and the adjusted likelihood-ratio test are checked against an independent NumPy/SciPy implementation of the SPSS formulas. Validation evidence
Questions
Why not use the ordinary chi-square on weighted counts?
The ordinary Pearson chi-square assumes independent observations and treats weighted counts as if they were the sample size, so under clustering it rejects far too often. The Rao–Scott adjustment divides it by the average generalized design effect and refers it to an F distribution on the design df.
Why do the df1 and df2 have decimals?
The second-order Rao–Scott correction also adjusts the degrees of freedom by the spread of the design effects: d = tr(Δ)²/tr(Δ²) and the denominator df is d times the design df, so both can be fractional.
Which percentage should I report?
Use Row % when the row variable defines the groups you compare (for example, the share of each age group that owns a home), Column % when the columns define them, and Table % for the joint distribution.
How are the risks in a 2×2 table defined?
Risks compare the first row with the second row. The relative risk and risk difference are given for the first column and for the second column, so put the groups in the rows and the outcome in the columns.
Is my survey file uploaded?
No. The workspace reads the file and runs CSTABULATE 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 DescriptivesCSDESCRIPTIVES
- Complex Samples Logistic RegressionCSLOGISTIC
- Crosstabs StatisticsCROSSTABS /STATISTICS
- FrequenciesFREQUENCIES
- Free SPSS alternative: full coverage list
Run Complex Samples Crosstabs 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.