Survival & Time Series

Two specialised families: Survival for time-to-event data, and Time Series for data ordered in time.

Survival

Analyze → Survival. Survival data record the time until an event (death, relapse, failure), where some cases are censored — the event had not happened by the end of observation.

Both procedures use a status variable that marks the event, plus an event value that says which code means "event happened" (other values are treated as right-censored).

Weighting. Survival estimates (Kaplan-Meier and Cox) honour the Weight Cases setting: the case weight is a frequency weight, folded into the risk sets, the event and censoring counts and the Greenwood standard errors (Kaplan-Meier and the log-rank test), and into the partial likelihood (Cox).

Kaplan-Meier

When. Estimate and compare survival curves without assuming a model.

Dialog. A time variable, a status variable (and its event value), and an optional factor to compare groups.

Output. The survival table (survival probability with Greenwood standard errors at each event time), a case summary with restricted-mean and median survival, and — with a factor — a log-rank (Mantel-Cox) test comparing groups. A Plot… option draws the survival curve (or a cumulative-hazard curve); membership/survival can be saved.

Cox Regression

When. Model the hazard from one or more predictors (proportional-hazards regression).

Dialog. Time, status (+ event value), and the covariates. Options include tie handling (Breslow / Efron), strata, a (start, stop] counting-process layout, a baseline survival table, and Test proportional hazards.

Output. Coefficients with standard errors and Wald tests, Exp(B) hazard ratios with confidence intervals, and the omnibus likelihood-ratio test. Baseline survival, martingale residuals and scaled Schoenfeld residuals can be saved.

Checking proportional hazards. Cox assumes each covariate's hazard ratio is constant over time. Tick Test proportional hazards to add the Grambsch-Therneau test: a Proportional Hazards Tests table with a global and a per-covariate χ², plus a scaled Schoenfeld residual vs. time scatter for each covariate. A small Sig. (or a clear trend in the plot rather than a flat band) is evidence the assumption is violated for that covariate — consider stratifying on it, adding a time interaction, or a (start, stop] layout. The time axis can be transformed by rank (default), identity or log.

Example. Model time-to-diagnosis by Age, BMI and SmokingStatus.

Time Series

Analyze → Time Series. For a variable whose cases are in time order. The series is taken as the non-missing values in case order.

Weighting. The series is analysed unweighted by design — a frequency weight replicates cases, which is undefined for a series taken in order (a duplicated observation has no place in the sequence). A weight variable still selects which cases are included; the output notes this when a weight is active.

Autocorrelation

When. Inspect the serial structure of a series before modelling it.

Dialog. The series variable; optional regular and seasonal differencing.

Output. The ACF (autocorrelation, with Bartlett standard errors and a cumulative Box-Ljung Q test) and the PACF (partial autocorrelation). A Plot… option draws the correlogram (stems with a ±1.96·SE band).

ARIMA / SARIMA

When. Fit a Box-Jenkins model and forecast.

Dialog. The series and the orders: regular (p, d, q) and, for seasonal data, (P, D, Q) with a period. Options choose the estimation method (conditional least squares or exact maximum likelihood), whether to choose orders automatically (by AIC or BIC), and how many forecast steps to produce.

Output. The model-parameters table (AR/MA terms with t-tests, residual variance, log-likelihood, AIC/BIC, a residual Box-Ljung test) titled with the fitted order, a model-selection table when auto-order is on, and — with a forecast — a forecast table plus a forecast Plot… (observed line, forecast line and a shaded prediction interval).

Stationarity Tests

When. Decide whether a series needs differencing before fitting ARIMA.

Dialog. The series and the deterministic terms (a constant, or a constant plus a linear trend).

Output. Two complementary tests, each with a statistic, a p-value and a 5% conclusion: the Augmented Dickey-Fuller test (null: a unit root — a small Sig. means the series is stationary) and the KPSS test (null: stationarity — a small Sig. means it is not). Agreement between them is reassuring; disagreement suggests a borderline or trend-stationary case. A * marks a KPSS statistic outside its lookup table, so that p is a bound.

Exponential Smoothing

When. A quick, robust forecast — the everyday alternative to ARIMA.

Dialog. The series, a trend (none → simple smoothing, or additiveHolt), a seasonal component (none, or additiveHolt-Winters, with a period), and the number of forecast steps.

Output. The fitted smoothing parameters (α level, β trend, γ season), a fit summary (SSE, residual variance, RMSE) and — with a forecast — the same forecast table and Plot… as ARIMA. The parameters are chosen by minimizing the one-step forecast error.

See also

  • Graphs — the correlogram, forecast and survival plots are also reachable as analysis-attached charts.