Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 39 ยท Interface and Data

The SPSS Data Editor, Output Viewer, Syntax Editor and Menus

Tour the SPSS interface: Data View and Variable View, the Output Viewer outline, the Syntax Editor, every top-level menu and the toolbar, with tips for working in several windows.

SPSS looks like a spreadsheet with menus, but it is really a small family of windows that work together. If you know what each window is for and where each menu lives, you will rarely get lost. This lesson is a guided tour. Menu names follow current IBM SPSS Statistics versions; older versions can differ slightly.

The Data Editor

The Data Editor is the main window. Its two tabs at the bottom are:

  • Data View: a grid. Rows are cases, numbered at the left. Columns are variables. You can type into cells, paste from a spreadsheet, sort, and search.
  • Variable View: one row per variable, with columns that define it. It is a data dictionary you can edit. See defining variables.

Useful features of Data View:

Action How
Jump to a case Edit > Go to Case... or Ctrl+G
Jump to a variable Edit > Go to Variable...
Find a value Edit > Find... (Ctrl+F) and Replace (Ctrl+H)
Show value labels instead of codes View > Value Labels
Change font, grid lines View > Fonts..., View > Grid Lines
Shorten long variable lists in dialogs Utilities > Define Variable Sets..., then Use Variable Sets...
Split the window Drag the small bar above the vertical or beside the horizontal scroll bar
Insert a variable or case Right-click a heading > Insert Variable / Insert Cases

A cell with a dot (.) is system-missing. A cell that shows 99 might be a user-missing code (see value labels and missing values). Cells in string variables are left-aligned by default and numbers right-aligned.

Typing into Data View changes data immediately; there is no unsaved-edit indicator per cell and the undo history is short (Edit > Undo only reverses the last change). Work on a copy and prefer syntax for bulk changes.

The Output Viewer

Every analysis sends results to the Output Viewer. The window has two panes:

  • the outline (left): a tree of every item (Log, Title, Notes, tables, charts);
  • the content (right): the items themselves.

Click outline items to jump, drag them to reorder, and double-click the book icon to collapse a branch. Items can be hidden or shown with the small eye or the View > Hide/Show toggle. Right-click on a table to Copy, Export, or Edit Content > In Separate Window.

Useful menus when the Output Viewer is active:

  • Insert adds titles, text, page breaks, new charts or new headings. A short title above each analysis makes a long output readable.
  • Format controls pivot table look (TableLooks...), alignment and fonts.
  • File > Export... sends output to Word, Excel, PowerPoint, PDF, HTML, text, or images.

Pivot tables

Double-click a table to edit it as a pivot table. You can swap rows and columns (Pivot > Transpose Rows and Columns), edit labels, change the number of decimals (select cells, then Format > Cell Properties or the Cell Formats toolbar), and apply a TableLook such as Academic or Compact. In a pivot table you can also open Pivoting Trays (Pivot > Pivoting Trays) to move dimensions between rows, columns and layers.

The Syntax Editor

Open a new one with File > New > Syntax. Type or paste commands that end with a period. Run them using the green arrow, Run > All or Run > Selection (Ctrl+R). Highlights, auto-complete, line numbers and a command-help panel make writing easier; Help or F1 on a command shows its syntax chart.

Commands never need to be in capitals, but the convention is capitals for command words. Comments start with * and end with a period, or use /* ... */.

TEXT
* Open the data and count cases per gender.
GET FILE='cafe_survey.sav'.
FREQUENCIES VARIABLES=gender.

The main menus

Menu What it is for
File Open, save, import and export data; new data, syntax, output; recent files
Edit Undo, copy, paste, find and replace, Options (settings)
View Status bar, toolbars, fonts, value labels, grid lines, variables
Data Working with the dataset as a whole: sort, merge, restructure, aggregate, select, split, weight, define dates
Transform Creating and changing variables: compute, recode, count, rank, date/time, replace missing
Analyze Statistical procedures, grouped by family
Graphs Chart Builder, Graphboard Template Chooser and legacy chart dialogs
Utilities Variables information, comments, define variable sets, run scripts
Extensions Extension hub, custom dialogs, Python and R tools
Window Switch between open Data Editors, Output Viewers and Syntax Editors
Help Topics, tutorials, Case Studies, statistics coach, syntax reference

A mnemonic: Data changes the shape of the file; Transform changes the variables; Analyze reads them; Graphs draws them.

The Analyze menu, by family

  • Reports and Descriptive Statistics (Frequencies, Descriptives, Explore, Crosstabs)
  • Tables (Custom Tables when licensed)
  • Compare Means (Means, t tests, One-Way ANOVA)
  • General Linear Model (Univariate, Multivariate, Repeated Measures)
  • Correlate, Regression, Loglinear, Classify
  • Dimension Reduction (Factor Analysis), Scale (Reliability), Nonparametric Tests
  • Forecasting, Survival, Multiple Response, Missing Value Analysis, Multiple Imputation, Complex Samples, Quality Control, ROC Curve

Chapters 4 to 6 use most of these.

Python Stand-in: where is that command? (menu finder)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The toolbar and status bar

The toolbar gives one-click access to Open, Save, Print, Undo, Redo, Go to Case, Variables, Find, Insert Cases, Insert Variable, Split File, Weight Cases, Select Cases, Value Labels and Use Variable Sets. Hover for a tooltip. The status bar at the bottom tells you whether SPSS is idle (IBM SPSS Statistics Processor is ready), and shows whether Split File, Filter On or Weight On is active. Those three indicators are important: a forgotten filter silently excludes cases from every later analysis.

Working with several windows and datasets

SPSS can have several datasets open at once, each in its own Data Editor window. Only one is active. Commands run against the active dataset, so check the title before you press OK. Use the Window menu to switch. The Syntax Editor has a drop-down of open datasets. In syntax you name datasets with DATASET NAME and switch with DATASET ACTIVATE. Several Output Viewers can also be open, but there is one designated viewer that receives results. In Window, choose Designate Window to change it.

TEXT
DATASET NAME survey.
GET FILE='other.sav'.
DATASET NAME other.
DATASET ACTIVATE survey.

Dialog boxes

Most procedures share the same layout. A source list on the left, target lists in the middle, and buttons on the right: Options, Statistics, Plots, Save. The bottom row has OK, Paste, Reset, Cancel, Help. Drag variables or use the arrow. Right-click a variable in a list and choose Variable Information to see its label and values without leaving the dialog, and tick Display variable names in Options if you need names instead of labels.

Python Stand-in: dialog rows to syntax (Paste)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  • Running a command while a different dataset is active.
  • Forgetting a filter or weight is still on (look at the status bar).
  • Losing results because the Output Viewer was closed without saving.
  • Typing a command in the Syntax Editor and pressing Run with nothing selected after the cursor is on the wrong line. Run selection, or Run > All.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which menu holds Compute Variable and Recode?

    Transform creates and changes variables. Data changes the file as a whole.
  2. 2. Where do you see whether a Select Cases filter or Weight is active?

    The status bar shows Filter On, Weight On and Split File indicators.
  3. 3. In the Syntax Editor, what ends a command?

    SPSS commands end with a period.
  4. 4. What does the Output Viewer outline pane let you do?

    The outline lists every item in the output and lets you jump to, move, hide or delete them.

Summary

  • The Data Editor has Data View (cases and values) and Variable View (variable definitions).
  • The Output Viewer collects tables and charts in an outline you can navigate and edit; pivot tables can be reformatted.
  • The Syntax Editor runs commands ending in a period and can be saved as .sps.
  • Menus: File, Edit, View, Data, Transform, Analyze, Graphs, Utilities, Extensions, Window, Help.
  • Check the active dataset and the status bar (Filter, Weight, Split File) before analyzing.

Next: Defining Variables in Variable View