SPSS Factor Analysis – Beginners Tutorial

What is Factor Analysis? Quick Data Check Running Factor Analysis in SPSS SPSS Factor Analysis Output Adding Factor Scores to Our Data What is Factor Analysis? Factor analysis is a statistical technique for identifying which underlying factors are measured by a (much larger) number of observed variables.Such “underlying factors” are often variables that are difficult […]

SPSS Data Analysis Roadmap

Set Up Project Folder and Open Data; SPSS Data File Inspection; SPSS Categorical Variable Inspection; SPSS Metric Variable Inspection; Optionally: Edit Data; Choose and Run Tables/Charts/Tests. 1. Set Up Project Folder and Open Data The biggest waste of time and effort in SPSS is probably not keeping projects organized. A related pitfall is not regularly making backup copies of the entire […]

SPSS Transformation Commands

Summary SPSS transformation commands (or simply “transformations”) can be loosely defined as commands that are not immediately carried out when you run them. Instead, they are kept in mind by SPSS and executed only when necessary. The table below gives an overview of SPSS’ main tranformation commands. Main SPSS Tranformation Commands COMMAND NAME GOAL TYPICAL USAGE […]

Sampling in SPSS

Sampling is at the very core of statistical tests: drawing conclusions on research populations based on (small) samples from those populations. Basically all statistical tests quietly assume that the data you’re analyzing are a simple random sample from your population. This assumption being ignored is the very reason why political polls are often widely off and research findings can’t be […]

SPSS RANGE Function – Quick Tutorial

COMPUTE v2 = RANGE(V1,2,4). SPSS RANGE Function Result Summary SPSS’ RANGE function is used to evaluate whether or not values are within a given range. Test values equal to the lower or upper boundary are also within the given range. Run the syntax below for a quick demonstration. SPSS Range Syntax Example *1. Create couple of cases. data list free/v1(f1). begin […]

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

SPSS ADD FILES Command

Summary ADD FILES is an SPSS command that’s mainly used for merging data sources holding similar variables but different cases. (For the same cases but different variables, see MATCH FILES.) A second use is for reordering and/or dropping variables in a single dataset. SPSS Add Files Matches Data Sources on Variable Names SPSS Add Files – Basic Usage The ADD FILES command […]

SPSS REPLACE Function

Definition SPSS REPLACE replaces a substring in a string by a different (possibly empty) substring. SPSS Replace – Removing Spaces URLs are created from “title” by using REPLACE. The syntax below demonstrates how to do this. We have a dataset holding the titles of web pages and we’d like to convert these to URLs. For one thing, we don’t like spaces in […]

SPSS INDEX Function

Summary The SPSS INDEX function returns the position of the first occurrence of a given expression within a string. If the expression does not occur in the string, it returns a zero. As a rule of thumb, always use it as CHAR.INDEX. The reason for this is explained SPSS Unicode Mode. Note that string values are case sensitive. SPSS Index […]

SPSS CD Command

A best practice in SPSS is to open and save all files with syntax. Like so, it can be easily seen which syntax was run on which data. One could use the syntax generated by Paste for this but there’s a much shorter and better option. Disadvantages of the Default Syntax Each time you open a data file from […]

SPSS Missing Values Functions

Most real world data contain some (or many) missing values. It’s always a good idea to inspect the amount of missingness for avoiding unpleasant surprises later on. In order to do so, SPSS has some missing values functions that are mostly used with COMPUTE, IF AND DO IF. This tutorial demonstrates how to use them effectively. We’ll do so […]

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 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 CORRELATIONS Command

Summary SPSS CORRELATIONS generates tables with Pearson correlations and their underlying N’s and p-values.* This tutorial quickly walks through its main options, using freelancers.sav for demonstrational purposes. User Missing Values Before running any correlations, we’ll first specify all values of one million dollars or more as user missing values for income_2010 through income_2014.* We’ll do so by running the following line […]

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 COMPUTE – Simple Tutorial

SPSS COMPUTE command sets the data values for (possibly new) numeric variables and string variables. These values are usually a function (such as MEAN, SUM or something more advanced) of other variables. This tutorial walks you through doing just that. We’ll use hospital.sav,a screenshot of which is shown below. Before proceeding, we’ll first set 6 as a user missing value for the last 5 […]

SPSS Sign Test for Two Medians – Simple Example

The sign test for two medians evaluates if 2 variables measured on 1 group of cases are likely to have equal population medians.* It can be used on either metric variables or ordinal variables. For comparing means rather than medians, the paired samples t-test and Wilcoxon signed-ranks test are better options. Adratings Data We’ll use adratings.sav throughout this tutorial. It holds data on 18 respondents […]

SPSS DESCRIPTIVES Command

Summary SPSS DESCRIPTIVES generates a single table with descriptive statistics for one or more variables. It can also add z-scores to your data. We’ll walk through its major options using freelancers.sav. The screenshot below shows part of its data view. User Missing Values Before running any descriptives, we first need to specify some user missing values for income_2010 through […]

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