SPSS DO REPEAT – Simple Tutorial & Examples

DO REPEAT is a command for running other commands repetitively.SPSS DO REPEAT is often used for looping over (possibly new) variables. VECTOR with LOOP is an alternative way for doing so. Introduction Suppose we have a variable containing values 1 through 4 and we’d like to dichotomize it for a regression analysis. (For some more background, see Creating Dummy Variables in SPSS.) […]

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

SPSS – Change Value Labels with Python

A local supermarket held a small survey, the data of which are in minisurvey.sav. Unfortunately, the software for downloading the data in SPSS format prefixes all variable and value labels with the variable names. The screenshot below shows part of the data. Undesired Prefixes in Value Labels Clicking on some value labels in variable view confirms that they’ve […]

SPSS Set Decimals Output Tables

SPSS doesn’t offer an easy way to set decimal places for output tables. This tutorial proposes a very simple tool for setting decimal places in basic output tables after they’ve been produced. It works best for simple tables such as DESCRIPTIVES, MEANS or CROSSTABS. Setting Decimal Places for Output Tables First, make sure that the SPSS Python Essentials are installed and […]

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