Disaggregate Data

Introduction Sometimes, one may start a project with aggregated data, weighted by a frequency variable. In some cases, though, disaggregating such data (creating n rows for a row with frequency n) may be desired. SPSS Syntax Example *1. Create test data. data list free/gender employed frequency. begin data 0 0 5 1 0 2 0 1 8 1 […]

SPSS VARSTOCASES With Labels Tool

Running VARSTOCASES is often necessary for generating nice charts in SPSS. One of the many examples is a stacked bar chart for comparing multiple variables. Sadly, we lose our variable labels when running VARSTOCASES and we really do need those. The solution is a simple tool that generates our VARSTOCASES for us and applies the variable labels of the input variables as value […]

SPSS VARSTOCASES – What and Why?

SPSS VARSTOCASES is short for “variables to cases”. It restructures data by stacking variables on top of each other as illustrated by the figure above. You can try this simple example for yourself by downloading and opening sav_data018 and running the syntax below on it. SPSS VARSTOCASES Example 1 *Very basic VARSTOCASES example. varstocases /make v from […]

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