SPSS – What’s the Best Way to Reverse Code Variables?

In SPSS, we sometimes encounter variables that are negatively coded: lower values indicate higher agreement or more positive sentiments. Although this is not really “wrong” in any way, positive coding is more intuitive. Especially when reporting means over variables, most readers naturally expect higher means to indicate something better, not worse. So what’s the best way to reverse code variables? […]

Convert String Date to SPSS Date Variable

“I’ve a string variable in my data holding dates formatted as ‘01JAN2016’ without separators between the day, month and year components. To make things worse, the month abbreviations are in Dutch and 3 of those differ from their English counterparts. How can I change this string into an SPSS date variable?” Step 1: Add Separators […]

SPSS Date Variables Basics

SPSS date variables may seem a bit puzzling at first. However, getting things done fast and accurately with SPSS date variables is not hard at all if you understand some basics. This tutorial will walk you through. You can follow along by downloading and opening hospital.sav. SPSS Date Variables – What Are They? First of all, […]

Recoding Variables in SPSS

Recoding both string and numeric variables in SPSS is usually done with RECODE. Doing so with syntax is way faster than with the menu, especially if you want to recode many variables at once. Note that you’ll often want to apply or adjust some value labels after recoding.Alternatively, string variables can be recoded into numeric variables with AUTORECODE. Doing […]

Remove Value Label from Multiple Variables

Question “I’d like to completely remove the value label from a value for many variables at once. Is there an easy way to accomplish that?” SPSS Python Syntax Example begin program. variables = ‘v1 to v5‘ # Specify variables here. value = 3 # Specify value to unlabel here. import spss,spssaux vDict = spssaux.VariableDict(caseless = True) varList […]

Computing Variables in SPSS – Overview

Computing new variables -often as means or sums over other variables- is usually done with COMPUTE. If you want to do so for only some cases but not others, use IF instead. Some alternatives for creating new variables in SPSS are RECODE, AUTORECODE, AGGREGATE and RANK. Computing Variables Tutorials SPSS Missing Values Functions SPSS COMPUTE – Simple Tutorial

SPSS Numeric Variables Basics

Introduction Having a basic understanding of SPSS numeric variables allows you to work fast and with a sense of confidence. This tutorial aims at accomplishing just that by pointing out some essential basics. You may follow along with this tutorial by downloading and opening hospital.sav. SPSS Numeric Variables – What Are They? Numeric variables are one of […]

SPSS Recode Values with Value Labels

Introduction In SPSS we sometimes find ordinal variables where lower values indicate more positive attitudes or larger quantities. An example is shown in the screenshot below. Now, the coding scheme shown above is not really ‘wrong’ in any way. However, we usually prefer higher values indicating more positive attitudes or larger quantities because we find this more […]

SPSS – Set Variable Labels with Syntax

Managing variable and value labels without syntax is way more work than necessary. This tutorial explains how to do this more efficiently. Changing Variable Labels in SPSS As with other parts of the dictionary, there’s no “Paste” option for modifying variable labels. Be aware that manual modifications – apart from being time consuming – are not […]

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

SPSS String Variables Basics

For working proficiently with SPSS string variables , it greatly helps to understand some string basics. This tutorial explains what SPSS string variables are and demonstrates their main properties. We encourage you along by downloading and opening string_basics.sav. The syntax we use can be copy-pasted or downloaded here. SPSS String Variables – What Are They? String variables are one […]

SPSS Date Variables Tutorial

SPSS date calculations are much easier than they may seem at first. The first key to success is understanding what SPSS date variables really are. Next, choose (and possibly combine) the right date functions. This tutorial will walk you through the main ones. We recommend you follow along by downloading and opening hospital.sav. SPSS Main Date Functions The table […]