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 CD Command

A best practice in SPSS is to open and save all files with syntax. Like so, it can be easily seen which syntax was run on which data. One could use the syntax generated by Paste for this but there’s a much shorter and better option. Disadvantages of the Default Syntax Each time you open a data file from […]

SPSS Data Preparation 6 – Inspect Cases

9. Missing Values per Case (Overview and data file are are found here) Missing values complicate some analyses or may sometimes indicate that respondents didn’t fill out the questionnaire very seriously. In any case, it’s a good idea to at least check how missing values are distributed over respondents and we often do so for sections […]

How to Mean Center Predictors in SPSS?

For testing moderation effects in multiple regression, we start off with mean centering our predictors:mean centering a variable is subtracting its mean from each individual score.After doing so, a variable will have a mean of exactly zero but is not affected otherwise: its standard deviation, skewness, distributional shape and everything else all stays the same. After mean […]

SPSS MATCH FILES Command

MATCH FILES is an SPSS command mostly used for merging data holding similar cases but different variables. For different cases but similar variables, use ADD FILES. MATCH FILES is also the way to go for a table lookup similar to VLOOKUP in Excel. Merging two datasets by id, which is a unique case identifier. SPSS Match Files – Basic Use 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 Sign Test for Two Medians – Simple Example

The sign test for two medians evaluates if 2 variables measured on 1 group of cases are likely to have equal population medians.* It can be used on either metric variables or ordinal variables. For comparing means rather than medians, the paired samples t-test and Wilcoxon signed-ranks test are better options. Adratings Data We’ll use adratings.sav throughout this tutorial. It holds data on 18 respondents […]

SPSS DESCRIPTIVES Command

Summary SPSS DESCRIPTIVES generates a single table with descriptive statistics for one or more variables. It can also add z-scores to your data. We’ll walk through its major options using freelancers.sav. The screenshot below shows part of its data view. User Missing Values Before running any descriptives, we first need to specify some user missing values for income_2010 through […]

How to Compute Means in SPSS?

This tutorial shows how to compute means over both variables and cases in a simple but solid way. We encourage you follow along by downloading and opening restaurant.sav, part of which is shown below. Quick Data Check Before computing anything whatsoever, we always need to know what’s in our data in the first place. Skipping this […]

How to Compute Age in SPSS?

A course was evaluated by 183 students. The data are in course_evaluation.sav, part of which is shown below. The teacher wants to know the average age of his students but we only have their date of birth. 1. Ensure Date of Birth is a Date Variable The first thing we’ll do is check if date of […]

Variance – What Is It?

The variance is a number that indicates how far a set of numbers lie apart.The variance is identical to the squared standard deviation and hence expresses “the same thing” (but more strongly). Variance – Example A study has 100 people perform a simple speed task during 80 trials. For each participant, 80 reaction times (in seconds) are […]

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 […]

SPSS WEIGHT Command

By default, every case in your data counts as a single case. However, you can have each case count as more or less than one case as well. This is called weighting. For instance, the first case in your data may count as 2 cases and the second one as .5 cases. These numbers, the case weights, […]

SPSS Main Numeric Functions

This tutorial covers some obvious and some less obvious functions for editing numeric variables. You can follow along with this tutorial by downloading and opening hospital.sav. They syntax we’ll use can be copy-pasted or downloaded here. Specifying User Missing Values This tutorial will only use the last 2 variables in the data.* Before doing anything else, we first specify […]