Software first contact

SPSS first contact.

A practical introduction to the Data Editor, Output Viewer and Syntax Editor for reproducible medical-statistics work.

Menus are useful for finding a procedure. The Paste button turns that choice into syntax you can save, inspect and rerun.

The workspace

Know where each part of the work lives.

Data View

Rows are cases and columns are variables. Use it to inspect values, not to make undocumented manual changes.

Variable View

Names, labels, types, missing-value rules and measurement levels live here.

Output Viewer

Tables, charts, warnings and model output appear here. Save it, but do not treat it as the analysis source.

Syntax Editor

The reproducible record: import, labels, transformations, tests and models in executable blocks.

Screen tour

See where the work happens.

IBM SPSS Statistics Data Editor with rows, variables and a variable-information panel
The Data Editor separates cases from variable metadata. In the teaching cohort, one row is one older adult and columns include age, medication count, baseline frailty, review status and six-month outcomes. IBM interface image ↗
IBM SPSS Statistics Syntax Editor with executable commands
The Syntax Editor is the analysis record. Select a complete command—including its final full stop—and run the selection. Interface details vary by SPSS version. Current IBM guidance ↗

Read in the cohort

From download to checked data.

  1. 01

    Make one analysis folder

    Download the CSV and the complete .sps file into the same folder. The CSV remains the unchanged source; syntax creates the labelled SPSS copy.

  2. 02

    Open the syntax before the data

    Open gerostats_medical_statistics_spss.sps. If SPSS cannot find the CSV, replace the /FILE= value with its full path. This is safer than relying on an import wizard to guess types.

  3. 03

    Run the import block

    Select the complete GET DATA command and choose Run → Selection. Then run the labels and measurement-level commands.

  4. 04

    Check the patient-shaped record

    Expect 720 rows and 16 variables. Confirm that med_review is labelled No/Yes, frailty_cat_6m is ordered and blank outcome cells remain missing rather than zero.

Clinical sense-check

A participant with no recorded six-month disability outcome has unknown outcome status—not “no disability”. That distinction changes the denominator and therefore the reported risk.

Download the cohort CSV

Working habit

Keep the analysis in syntax.

Use a new syntax window for the analysis. If you open a menu to learn a procedure, choose Paste rather than OK. SPSS writes the command into the Syntax Editor; annotate it, save it and run the selected block. A full stop ends each command.

Put the CSV and syntax file in one project folder. The complete download defines every variable explicitly, so codes and decimal formats do not depend on import guesses.

* A comment begins with an asterisk and ends with a full stop.

GET DATA
  /TYPE=TXT
  /FILE='gerostats_medication_review_cohort.csv'
  /ARRANGEMENT=DELIMITED
  /FIRSTCASE=2
  /DELIMITERS=","
  /VARIABLES=
    participant_id A7
    age_years F3.0
    /* Full variable list is in the download */.

DISPLAY DICTIONARY.
FREQUENCIES VARIABLES=sex med_review.
DESCRIPTIVES VARIABLES=age_years baseline_frailty.

Complete SPSS syntax

Import, labels, checks, tests, regression, confounding and a saved labelled dataset.

Download the .sps file

Common cohort CSV

The same software-neutral data used in all three routes.

Download the CSV

Continue

Use the common cohort.

The Statistics Lab uses one synthetic older-adult cohort in Stata, SPSS and R. Start with the import and checking page, then follow the same statistical route in your chosen software.

Open step 01 · Meet the cohort

Official resources

Documentation and videos.

IBM SPSS resources

Official quick-start material, feature videos and tutorials.

Open IBM resources

Crosstabs reference

Official definitions for chi-square, risk estimates and related statistics.

Open IBM documentation