Using Case Summaries in SPSS to Debug your Variable Creation

Here’s a little SPSS tip.

When you create new variables, whether it’s through the Recode, Compute, or some other command, you need to check that it worked the way you think it did.

(As an aside, I hope this goes without saying, but never, never, never, never use Recode into Same Variable.  Always Recode into Different Variable so you don’t overwrite your data and then discover you made a mistake.  Or worse, not discover.  It happens).

And the easiest way to do that is to simply look at the data.  You need to look at the values of the new variable along with the variables you created it from.    Work your way through the variable creation logic and make sure you got the values you should be getting.

To do this, you need your old and new variables next to each other.  This is tricky to do in the data spreadsheet if the variables you’re creating from are way back in a huge data set.

A much easier approach is to use the SUMMARIZE command.  All it does is list out the data for the variables you tell it to.

You can do it through the menus using:

Analyze–>Reports–>Case Summaries

Just list your newly created variable along with the ones you used to create it in the Variables box.

The default is to list only the first 100 cases, so you don’t end up with a ginormous table if you have a large data set.  But you can easily change this up or down, depending on whether you need more or fewer cases to check your logic.

This is the syntax to do the same thing:

/TABLES=OldVar1 OldVar2 NewVar
/TITLE=’Case Summaries’


Getting Started with SPSS
Karen will introduce you to how SPSS is set up, some hidden features to make it easier to use, and some practical tips.

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.