SPSS Computes Wrong Week Numbers?

While working on data holding a record for each day, I wanted to create some graphs on week level. So I extracted the weeks with XDATE.WEEK but the week numbers returned by SPSS are nonsensical: every week starts on January 1 and most years end up with week 53 holding just 1 day. There’s different standards for week […]

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

Date Variables

In SPSS, a date is the number of seconds since the year 1582. These are huge numbers but they are still just numbers like somebody’s weight in kilos or the number of cars in some household. The main difference between dates and other variables is that SPSS displays dates with slashes or dots as in “2016/11/07”. Once you fully realize […]

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

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 – 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 RANK Command

Summary SPSS RANK can be used to create a variable holding the rank numbers of the values of some other variable. RANK is also used for discretizing continuous variables into ntile groups. This tutorial walks you through the main options along with some real world examples. Result of first RANK syntax example 1. SPSS Rank Basic Example Running the syntax below first creates […]

SPSS AGGREGATE Command

Aggregate is an SPSS command for creating variables holding statistics over cases. This tutorials briefly demonstrates the most common scenarios and points out some best practices. SPSS Aggregate Command The SPSS AGGREGATE command typically works like so: One or more BREAK variables can be specified.* All cases with the same value(s) on the break variable(s) are referred to as a break group Each […]

SPSS MEANS – Statistics by Category

Summary SPSS MEANS produces tables containing means and/or other statistics for different groups of cases. These groups are defined by one or more categorical variables. If assumptions are met, MEANS can be followed up by an ANOVA. This tutorial walks through its main options, pointing out some tips and tricks. You may follow along by downloading and opening freelancers.sav. […]

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

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