SPSS IF – A Quick Tutorial

In SPSS, IF is a conditional COMPUTE command. It calculates a (possibly new) variable but only for those cases that satisfy some condition(s). This tutorial walks you through some typical examples of the IF command. Example 1 – Replace Missing Values With the syntax below we’ll first create some test data. Next we’ll set the existing variable score […]

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 ALTER TYPE – Simple Tutorial

SPSS ALTER TYPE command is mainly used for converting string variables to numeric variables. However, it has other interesting applications as well. This tutorial quickly walks you through those, pointing out some pitfalls, tips and tricks along the way. You can follow along by downloading and opening holidays.sav but you do need SPSS version 16 or higher for using ALTER […]

How to Convert String Variables into Numeric Ones?

Converting an SPSS string variable into a numeric one is simple. However, there’s a huge pitfall that few people are aware of: string values that can’t be converted into numbers result in system missing values without SPSS throwing any error or warning. This can mess up your data without you being aware of it. Don’t believe me? I’ll demonstrate the problem -and the solution- […]

SPSS Sum – Cautionary Note

Summary In SPSS, SUM(v1,v2) is not always equivalent to v1 + v2. This tutorial explains the difference and shows how to make the right choice here. Different Ways of Taking Sums have Different Outcomes when Missing Values are Present Explanation In SPSS, v1 + v2 + v3 will result in a system missing value if at least one missing value is present in v1, […]

SPSS Missing Values Tutorial

SPSS System Missing Values SPSS User Missing Values Setting User Missing Values Inspecting Missing Values per Variable SPSS Data Analysis with Missing Values What are “Missing Values” in SPSS? In SPSS, “missing values” may refer to 2 things: System missing values are values that are completely absent from the data. They are shown as periods in data view. […]

SPSS Datetime Variables Basics

Introduction Working with SPSS datetime variables is not hard at all if you understand some basics. This tutorial walks you through just those. Those who’d like to follow along may download and open hospital.sav. SPSS Datetime Variables – What Are They? SPSS datetime variables are variables that hold the numbers of seconds between the year 1582 and […]

SPSS Time Variables Basics

Introduction Working efficiently with SPSS time variables is not hard if you understand some basics. This tutorial walks you through just those. We recommend you follow along by downloading and opening hospital.sav. SPSS Time Variables – What Are They? SPSS time variables are variables that hold time intervals in numbers of seconds. Although the actual time values […]

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

Concatenate (General Concept)

Concatenating two or more strings is creating a new string consisting of the characters of the first string followed by the characters of the subsequent string(s) in their original order. SPSS CONCAT Function Concatenating in SPSS is done by the CONCAT function. The most basic usage is COMPUTE A = CONCAT(B,C,D). Note that you can concatenate only strings. For concatenating numbers, […]

Substring (General Concept)

A substring is a subset of characters from a string. Extracting substrings in SPSS is done with CHAR.SUBSTR (SPSS versions 16+) or just SUBSTR (SPSS versions 15-). CHAR.SUBSTR takes two or three arguments as shown by the minimal example below. SPSS CHAR.SUBSTR – Minimal Example COMPUTE var_2 = CHAR.SUBSTR(var_1,3,2). The three arguments mean the following: var_1 denotes the variable […]

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 Binomial Test

SPSS binomial test is used for testing whether a proportion from a single dichotomous variable is equal to a presumed population value. The figure illustrates the basic idea. SPSS Binomial Test Example A biologist claims that 75% of a population of spiders consist of female spiders. With a lot of effort he collects 15 spiders, 7 of […]

What is a Dichotomous Variable?

A dichotomous variable is a variable that contains precisely two distinct values.Let’s first take a look at some examples for illustrating this point. Next, we’ll point out why distinguishing dichotomous from other variables makes it easier to analyze your data and choose the appropriate statistical test. Examples Regarding the data in the screenshot: completed is not a dichotomous variable. It […]

Measurement Levels

Measurement levels refer to different types of variables that imply how to analyze them. Standard textbooks distinguish 4 such measurement levels or variable types. From low to high, these are nominal variables; ordinal variables; interval variables; ratio variables. The “higher” the measurement level, the more information a variable holds. The simple flowchart below shows how […]

SPSS Scatterplot Tutorial

A large bank wants to gain insight into their employees’ job satisfaction. They carried out a survey, the results of which are in bank_clean.sav. The survey included the number of hours people work per week and their gross monthly salaries. Research Question It seems obvious that working hours are related to monthly salaries: employees who work […]

Pearson Correlations – Quick Introduction

A Pearson correlation is a number between -1 and 1 that indicates the extent to which two variables are linearly related.The Pearson correlation is also known as the “product moment correlation coefficient” (PMCC) or simply “correlation”. Pearson correlations are suitable only for metric variables (which include dichotomous variables). For ordinal variables, use the Spearman correlation or Kendall’s tau and […]

Sampling Distribution

A sampling distribution is the frequency distribution of a statistic over many random samples from a single population.Sampling distributions are at the very core of inferential statistics but poorly explained by most standard textbooks. The reasoning may take a minute to sink in but when it does, you’ll truly understand common statistical procedures such as ANOVA or a chi-square test. […]

Z-Scores – What and Why?

Z-scores are linearly transformed data values having a mean of zero and a standard deviation of 1.Z-scores are also known as standardized scores; they are scores (or data values) that have been given a common standard. This standard is a mean of zero and a standard deviation of 1. Contrary to what many people believe, z-scores are not necessarily […]

SPSS Independent Samples T Test

Null Hypothesis Assumptions Independent Samples T Test in SPSS Output Reporting Null Hypothesis The null hypothesis for an independent samples t test is that two populations have equal means on some metric variable. For example, do men spend the same amount of money on clothing as women? We can’t reasonably ask the entire population of men and women how much they […]