SPSS command: SPSS CSPLAN
Declare a complex sampling plan in your browser
A sampling plan tells every Complex Samples procedure how your survey was drawn: which variable is the sampling weight, which define the strata and the clusters, and whether variances use with-replacement or without-replacement formulas.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs saves the plan for the dataset in this browser, reports the design degrees of freedom, and nothing is guessed from column names.
- How many cases enter the design, and how many were excluded for a missing or non-positive weight or a missing design variable.
- The number of strata and primary sampling units (PSUs) the variance will be computed from.
- The design degrees of freedom (PSUs minus strata) that every confidence interval and test will use.
- Whether variance estimation is with replacement (ultimate cluster, stage 1 only) or equal-probability without replacement with finite population corrections at each stage.
When to use it
Use it when
- Your data come from a stratified and/or clustered survey with a weight variable, and you want design-based standard errors instead of simple-random-sampling ones.
- Before running Complex Samples Descriptives, Crosstabs, GLM, Logistic, Ordinal or Cox Regression: they all read the same saved plan.
- The sampling fractions are large enough to matter and you know the population sizes or sampling rates per stratum, so a finite population correction applies.
Use something else when
- Your weight comes from raking or post-stratification of a simple random sample and you only need weighted tables: use the weighting and crosstab tools instead.
- Your weight is a frequency count of identical cases: declare it as a frequency weight in the workspace, not as a sampling weight.
- The design needs replicate weights (jackknife, BRR, bootstrap) or unequal-probability without-replacement variance formulas: this panel offers only Taylor linearization with WR or equal-probability WOR estimation.
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 Sampling plan (CSPLAN).
- 03
Choose the weight and estimation
Pick the Sampling weight (required). Under Estimation choose With replacement (WR) or Equal probability, without replacement, and under SRS reference for design effects keep Without replacement (SPSS default) or switch to With replacement.
- 04
Declare strata and clusters
In Stage 1, tick the Strata (optional) and Clusters / primary sampling units (optional). Several variables combine into one stratum or cluster key; with no cluster variable each case is its own PSU.
- 05
Add population sizes for WOR designs
With without-replacement estimation, set the Finite population correction to Population size per stratum or Sampling rate per stratum and choose the Variable holding it. Add a second stage for two-stage designs; it needs first-stage clusters.
- 06
Save the plan
Click Save plan. The Design Summary appears and every Complex Samples procedure on this dataset now uses the plan; Remove saved plan clears it.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
The synthetic 120-respondent survey (three strata, four PSUs per stratum, ten respondents per PSU), with the weight blanked for two respondents. The plan declares weight, stratum and psu with with-replacement estimation; the second table re-runs Complex Samples Descriptives for mean spend under three plans that share the same weight.
| Item | Value |
|---|---|
| Cases in the design | 118 |
| Strata | 3 |
| Primary sampling units | 12 |
| Design degrees of freedom | 9 |
| Excluded: missing or non-positive weight | 2 |
| Excluded: missing design variables | 0 |
With-replacement estimation: only stage-1 strata and clusters enter the variance (ultimate cluster).
| Plan | Estimate | Std. Error | 95% CI Lower | 95% CI Upper | Design Effect | Design df |
|---|---|---|---|---|---|---|
| Weight only | 171.88 | 4.16 | 163.64 | 180.13 | 1.113 | 117 |
| Weight + strata | 171.88 | 3.49 | 164.98 | 178.79 | 0.780 | 115 |
| Weight + strata + clusters | 171.88 | 6.71 | 156.70 | 187.06 | 2.890 | 9 |
Same weight in every row: only the declared strata and clusters change.
How to read it
The plan keeps 118 of 120 cases (2 dropped for a missing weight) in 3 strata and 12 PSUs, so the design has 9 degrees of freedom (PSUs minus strata). The weighted mean of spend is 171.88 under every plan, but its standard error is 4.16 with the weight alone, 3.49 once strata are declared (design effect 0.78) and 6.71 once clusters are added (design effect 2.89, on only 9 df). Here stratification lowers the standard error, while ignoring the clusters would understate it.
Output tables explained
- Design Summary
- Cases in the design, strata, primary sampling units and design degrees of freedom, plus how many cases were excluded for a missing or non-positive weight or missing design variables. The footnote states whether only stage-1 units enter the variance (WR) or finite population corrections apply at each stage.
- Sampling plan
- Every Complex Samples panel opens with this one-line summary of the saved plan — weight, strata, clusters and estimation — so you can see which design produced the numbers below it.
Assumptions and notes
- 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.
- Inference uses t and F distributions on the design degrees of freedom (PSUs minus strata). With few PSUs per stratum the df are small and intervals are wide; a stratum with a single PSU contributes no variance.
- Population sizes or sampling rates must be constant within each stratum, rates must lie between 0 and 1, and a population size cannot be smaller than the number of sampled units in its stratum.
- With replacement (WR) estimation uses only the stage-1 strata and clusters (the ultimate-cluster approximation); a second stage is used only with equal-probability without-replacement estimation.
How the results are validated
The plan builds the design frame that every Complex Samples procedure uses, so it is validated through them: on a synthetic two-stage stratified survey (235 cases, 4 strata, 15 PSUs) the estimates agree with the R survey package (svydesign) to a relative 1e-9 under three plans — stratified clusters with replacement, two stages without replacement with population sizes, and stratified with sampling rates. Unit tests also check that stored plans are parsed defensively, that without-replacement stages require population sizes or rates, that a single-PSU stratum adds zero variance with df = PSUs − strata, and that population sizes below the sampled count are rejected. Validation evidence
Questions
Where is the plan stored? Does SPSS's .csplan file work?
The plan is saved in this browser for this dataset, identified by the file name, the number of rows and the variable list. It is not written to a .csplan file and a .csplan file cannot be imported: declare the same weight, strata and clusters in the panel instead.
Why did my saved plan disappear?
The plan is tied to the dataset's identity. Renaming the file, adding or removing rows, or adding a computed variable makes it a different dataset, and private browsing or cleared site data removes stored plans. Re-declare the plan and save it again.
Should I choose with or without replacement?
With replacement (WR) is the usual, slightly conservative choice when first-stage sampling fractions are small, and it needs only the weight, strata and PSUs. Choose equal probability without replacement when fractions are large and you have population sizes or rates per stratum; it applies a finite population correction and can use a second stage.
What is the SRS reference for design effects?
A design effect divides the design-based variance by the variance a simple random sample of the same size would have. Without replacement (SPSS default) includes a finite population correction based on n and the estimated population size; With replacement leaves it out. It changes design effects only, not standard errors.
What if a stratum has only one PSU?
A stratum with a single PSU contributes zero to the variance, and it still counts in the design degrees of freedom. If that matters for your survey, collapse such strata with a neighbouring stratum before saving the plan.
Is my survey file uploaded?
No. The workspace reads the file and runs the design checks 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 DescriptivesCSDESCRIPTIVES
- Complex Samples CrosstabsCSTABULATE
- Complex Samples General Linear ModelCSGLM
- Select a Complex SampleCSSELECT
- Crosstabs StatisticsCROSSTABS /STATISTICS
- Free SPSS alternative: full coverage list
Run Complex Samples Plan 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.