SPSS command: SPSS CSCOXREG
Cox regression for complex survey data
Complex Samples Cox Regression models time to an event — leaving a programme, a first diagnosis, a customer cancelling — in survey data with strata, clusters and weights.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS CSCOXREG procedure on your device: a weighted pseudo partial likelihood with Efron or Breslow ties, hazard ratios with intervals on the design degrees of freedom, and a robust design-based variance from weighted score residuals.
- How each predictor multiplies the event rate, as a hazard ratio Exp(B) with a design-based interval.
- Whether each predictor matters overall, from Wald F and Rao–Scott adjusted tests on the design df.
- How many events and censored cases the model used.
- How much the design changes each coefficient's variance compared with simple random sampling (design effects).
When to use it
Use it when
- Survey or panel data with a follow-up time and an event indicator, drawn with strata, clusters and unequal weights.
- Population-level hazard ratios are the goal, for example from a national health survey linked to later outcomes.
- Many tied event times (months, years): pick the Efron approximation, which handles ties more accurately than Breslow.
Use something else when
- Data from a simple random sample or a trial: Cox Regression offers more diagnostics and plots.
- You need survival curves, time-dependent covariates, late entry or a stratified baseline hazard: each record here is one subject entering at time 0, and only coefficient tables are produced.
- You only want to describe survival without predictors: use Kaplan-Meier or Life Tables.
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 Cox Regression (CSCOXREG).
- 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
Set time and status
Choose the Time variable (zero or positive), the Status variable and the Value meaning the event occurred; every other valid status value counts as censored. Pick Efron or Breslow under Ties.
- 05
Add predictors and run
Tick at least one of Factors (categorical) or Covariates (numeric), set the Confidence level and run. There is no intercept: the baseline hazard absorbs it.
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. Here the outcome is months until a customer churned, censored at 24 months (churned = 1 marks the event).
| Item | Value |
|---|---|
| Pseudo −2 log likelihood (initial) | 75569.7 |
| Pseudo −2 log likelihood (final) | 75296.1 |
| Events | 68 |
| Censored | 52 |
| Unweighted cases used | 120 |
| Parameter | B | Std. Error | Sig. | Exp(B) | Exp(B) 95% CI Lower | Exp(B) 95% CI Upper |
|---|---|---|---|---|---|---|
| [sex=Female] | −0.277 | 0.273 | .337 | 0.758 | 0.409 | 1.406 |
| [sex=Male]ᵃ | 0 | |||||
| age | 0.015 | 0.007 | .060 | 1.015 | 0.999 | 1.032 |
a. Set to zero because this parameter is redundant (the last category is the reference). Ties handled by the Efron approximation. Robust design-based variance from weighted score residuals (Binder 1992).
How to read it
68 respondents churned and 52 were censored. Exp(B) is the hazard ratio: women churn at 0.76 times the rate of men (95% CI 0.41 to 1.41, p = .337), and each year of age multiplies the hazard by 1.015 (p = .060). Intervals use t on 9 design df with the robust design-based variance.
Output tables explained
- Model Summary
- Pseudo −2 log likelihood for the null and final models, the number of events and censored cases, unweighted cases used and the estimated population size.
- Tests of Model Effects
- Wald F, Wald chi-square and Rao–Scott Adjusted F for each predictor, on the design degrees of freedom.
- Parameter Estimates
- B, standard error, interval, t, df, significance and design effects, with Exp(B) — the hazard ratio — and its interval. Footnotes name the ties method and the robust design-based variance.
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.
- Proportional hazards: each predictor multiplies the hazard by the same factor at every time point.
- Censoring is unrelated to the risk of the event once the predictors are accounted for; every record is one subject observed from time 0.
- 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.
How the results are validated
On a synthetic two-stage stratified survey (235 cases) under three designs, coefficients, robust standard errors and hazard ratios for a model with a factor and a covariate match the R survey package's svycoxph to a relative 1e-9, with both Breslow and Efron ties, on continuous survival times and on heavily tied ones. Validation evidence
Questions
How do I read Exp(B)?
Exp(B) is the hazard ratio. Above 1 means a higher event rate: 1.5 means the event happens 50% faster at any given time; below 1 means a lower rate. For a factor level it is relative to the last (reference) level.
Efron or Breslow ties?
Both give the same answer when no event times are tied. With many ties, Efron is more accurate; Breslow is simpler and is the default in some packages.
Why is it called a robust variance?
The variance is built from the weighted score residuals of each case, summed within PSUs and compared across PSUs within strata, then sandwiched with the information matrix. It reflects the sampling design rather than assuming the model-based Cox variance.
Can the status variable have several event codes?
The panel takes one value as the event; all other valid values are censored. To treat several codes as the event, recode them into one value first.
Is my survey file uploaded?
No. The workspace reads the file and runs CSCOXREG 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 Logistic RegressionCSLOGISTIC
- Cox RegressionCOXREG
- Kaplan-MeierKM
- Life TablesSURVIVAL
- Free SPSS alternative: full coverage list
Run Complex Samples Cox 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.