SPSS Command Types

Summary SPSS commands come in three basic types: procedures, transformations and other commands. Understanding this distinction will allow you to get things done in SPSS faster and more efficiently. SPSS Command Types Diagram SPSS Transformations As shown in the figure, the first question is when a command is executed. Some SPSS commands are not carried out […]

SPSS Sampling Basics

Summary How to draw one or many samples from your data in SPSS? This tutorial demonstrates some simple ways for doing so. We’ll point out some tips, tricks and pitfalls along the way. Let’s get started and create some test data by running the syntax below. SPSS Syntax for Creating Test Data *Create test data with […]

SPSS – Merge Categories of Categorical Variable

Summary Merging some categories of a categorical variable in SPSS is not hard if you do it the right way. This tutorial demonstrates just that. We recommend you try the examples for yourself by downloading and opening hotel_evaluation.sav. Right, when doing a routine inspection of this data file, we’ll see that the variable nation has many small categories. This becomes apparent when […]

SPSS Unicode Mode

SPSS Unicode mode is a setting which implies that all text is encoded as UTF-8 (Unicode Tranformation Format – 8 bit). Note that this tutorial leans substantively on Unicode. SPSS Unicode Mode – What and Why Up to version 15, all character encoding in SPSS was based on code pages. SPSS using code pages is now […]

SPSS Missing Values Functions

Most real world data contain some (or many) missing values. It’s always a good idea to inspect the amount of missingness for avoiding unpleasant surprises later on. In order to do so, SPSS has some missing values functions that are mostly used with COMPUTE, IF AND DO IF. This tutorial demonstrates how to use them effectively. We’ll do so […]

SPSS System Variables

Summary SPSS uses a handful of hidden variables for keeping track of things. These so called system variables have names starting with “$” and can be useful in some cases. The most important one is $casenum, the number shown next to each case in the data editor window. SPSS $casenum SPSS $casenum In the left outline of the […]

SPSS COMPUTE – Simple Tutorial

SPSS COMPUTE command sets the data values for (possibly new) numeric variables and string variables. These values are usually a function (such as MEAN, SUM or something more advanced) of other variables. This tutorial walks you through doing just that. We’ll use hospital.sav,a screenshot of which is shown below. Before proceeding, we’ll first set 6 as a user missing value for the last 5 […]

SPSS RECODE – Simple Tutorial

SPSS RECODE replaces data values with different values. It comes in handy for merging categories, dichotomizing continuous variables and some other tasks. This tutorial walks you through its main options, best practices and pitfalls. SPSS Recode Example 1 For quickly getting very proficient with RECODE it’s recommended you follow along with the examples. You’ll soon notice […]

Measurement Levels

Measurement levels refer to different types of variables that imply how to analyze them. Standard textbooks distinguish 4 such measurement levels or variable types. From low to high, these are nominal variables; ordinal variables; interval variables; ratio variables. The “higher” the measurement level, the more information a variable holds. The simple flowchart below shows how […]

Compute A = B = C

Summary A great way to dichotomize variables is with a single short compute command. This is also the fastest way to create multi variable filters. How Does it Work? When the structure COMPUTE A = B = C is used, SPSS will evaluate whether (B = C) is True or False for each case. The outcome variable A will be the following If (B […]