Changing Variable Properties 3 – Type

SPSS offers several ways to change a variable’s type. This tutorial will walk you through some examples. SPSS Variable Type – Why Change it in the First Place? What you can do with a variable may depend on its type and – to a lesser extent – on its format. For example, you can extract substrings from string variables but not from numeric variables. […]

Changing Variable Properties 2 – Names

The right way for changing variable names in SPSS is using RENAME VARIABLES. Changing variable names manually in variable view is a bad idea because you can’t keep track of what you did. This tutorial shows a better alternative. Changing Variable Names in SPSS Changing variable names with syntax is straightforward with the RENAME VARIABLES command. The main thing to keep in mind is […]

Changing Variable Properties 4 – Width and Decimals

Changing a variable’s width is rarely necessary. Nevertheless, it’s good to know how when it’s needed and how it’s done. Changing Variable Width in SPSS For string variables, width refers to how many characters a value can hold. An exception are multibyte characters as explained in SPSS Unicode Mode. Somewhat confusingly, “width” is not the width of a variable’s column […]

Changing Variable Properties 1 – Introduction

A great way to start working from syntax is using “Paste” instead of “Ok”. However, there’s no “Paste” option for modifying most variable properties. This tutorial shows how handle that properly. Changing Variable Properties Note that all variable properties (such as variable labels and value labels) are part of the SPSS dictionary. It is strongly recommended you use syntax in […]

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 – 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 – Convert String into Date Variable

For converting string variables to date variables, ALTER TYPE is the way to go. This tutorial demonstrates how to do this and points out a couple of caveats. For those who can’t use ALTER TYPE, we’ll propose some alternatives. SPSS Alter Type The syntax below first creates a mini dataset holding 8 string variables. They demonstrate the 8 most common date formats. Next, […]

SPSS Variable Types and Formats Tutorial

Understanding SPSS variable types and formats allows you to get things done fast and reliably. Getting a grip on types and formats is not hard if you ignore the very confusing information under variable view. This tutorial takes away the confusion and puts you back in control. We encourage you to follow along with this tutorial by downloading and opening computer_parts. […]

SPSS FILTER – Quick & Simple Tutorial

SPSS FILTER temporarily excludes a selection of cases from all data analyses.For excluding cases from data editing, use DO IF or IF instead. SPSS Filtering Basics Example 1 – Exclude Cases with Many Missing Values Example 2 – Filter on 2 Variables Example 3 – Filter without Filter Variable Tip – Commands with Built-In Filters Warning – Data Editing with […]

Dictionary Tutorial

Properties of variables and values such as names, formats and labels are collectively referred to as the dictionary in SPSS. Most of the dictionary is seen under variable view but -trust me on this one- you don’t want to edit anything here manually or by copy-pasting.Instead, manage your dictionary by syntax -it’s way faster, easier and safer. The […]