Data Analysis

SPSS® Reference Manual: A guide for market researchers

Prepared by Paul Hartzer

Contents

Overview

SPSS offers a wide variety of analytical tools. However, for the vast majority of basic market research data processing, we only use three:

  1. Frequencies (aka "freqs" or "counts"), a simple distribution of how respondents answered a single question.
  2. Basic cross-tabs, a comparison of one question vs. another.
  3. Advanced cross-tabs, where we construct a banner (column heading) or stub (row heading) from multiple questions.

Cross-tabs also often have layers, a third dimension. For instance, if we wanted to compare how men and women differed in time intention, and were interested in whether there's a difference between panel companies, we would put the panel company in a layer.

Frequencies

GUI method

  1. Make sure that your desired weight and filter are turned on (or off).
  2. On the menu, select Analyze.
  3. Select Descriptive Statistics > Frequencies.
  4. In the dialog box, select the variables you want to look at and click on the arrow button.
  5. If you want statistics other than counts, such as mean, median, or standard deviation, click on the Statistics... button and make your selections. (Close the dialog with Continue.)
  6. Click OK.

Syntax method

The basic command is:

FREQUENCIES VAR=Var1 Var2.

To also include statistics in the report, use the /STATS subcommand:

FREQUENCIES VAR=Var1 Var2 /STATS=MEAN MEDIAN STDDEV.

For instance, to get an unweighted count of respondents by age, including the median age, this would be the syntax:

WEIGHT OFF.
FREQUENCIES VAR=AGE /STATS=MEDIAN.

Basic cross-tabs

This technique will allow you to do basic data comparisons. For most basic, quick analysis, this is the quickest method. A drawback is that the resulting output is not as customizable as more advanced cross-tabs are.

GUI method

  1. Make sure that your desired weight and filter are turned on (or off).
  2. On the menu, select Analyze.
  3. Select Descriptive Statistics > Crosstabs.
  4. In the dialog box, select the variables you want in the rows and columns. Note that variables will not be nested. That is, if you select two column variables (var1 and var2) and two row variables (var3 and var4), SPSS will output four tables: var1 x var3, var1 x var4, var2 x var3, and var2 x var4. (If you want nesting, and layers won't satisfy your needs, use the advanced cross-tabs technique instead.)
  5. If you want a third dimension, select a variable for the layer.
  6. Note that the default cell format is to provide a rounded count. If you're using weighted data, this will probably result in undesired truncation. Select Cells... and pick "No adjustments" under Noninteger Weights. (Continue closes this window.)
  7. To get row or column percentages, select Cells... and check the appropriate value(s). (Continue closes this window.)
  8. If you want any statistics, such as correlations, select Statistics... and check the appropriate option(s). (Continue closes this window.)
  9. Click OK to run the crosstab.

Syntax method

The basic command is (/COUNT ASIS prevents SPSS from rounding the counts):

CROSSTABS /TABLES=RowVar1 BY ColVar1 BY LayerVar1
  /STATISTIC=CORR
  /CELLS= COUNT ROW COLUMN
/COUNT ASIS.

For instance, to compare age and gender to language spoken, and show what percent of each age group and gender speak which language, this would be the syntax:

CROSSTABS /TABLES=AGE GENDER BY LANGAUGE
  /CELLS= COUNT ROW
/COUNT ASIS.

Advanced cross-tabs: General tables (intermediate)

For the most part, the General Tables function acts a lot like basic cross-tabs. However, there are certain additional features:

Tables is a separate, add-on module, and is not covered in the basic SPSS Syntax Reference Guide that SPSS publishes; rather, there's a separate reference guide called SPSS Tables. Tables may not be available to all users.

GUI method

  1. Make sure that your desired weight and filter are turned on (or off).
  2. On the menu, select Analyze.
  3. Select Tables > General Tables.
  4. In the dialog box, select the variables you want in the rows and columns. If you want to nest variables, select the top level variable first. Then select the second one and click "Nest." For instance, to nest gender within age, pick Age, then the arrow, then Gender, then the arrow, then >Nest. Gender will then be indented slightly to show that it's nested.
  5. If you want a third dimension, select a variable for the layer.
  6. A difference between basic cross-tabs and this method is that statistics have to be created for each variable in this method. To get row or column percentages, highlight a variable and select Edit Statistics... and check the appropriate value(s). You can also specify the exact format for numbers at this point. (Continue closes this window.)
  7. You cannot get correlations or other statistics through this method.
  8. Click OK to run the crosstab.

Syntax method

The basic command is:

TABLES /TABLE = Var1 + Var2 > Var3 BY Var4 
  /STATISTICS
  count( Var3 ( F5.0 ))
cpct( Var3 ( PCT5.1 ) '%': Var4 )

The Table subcommand lists the variables to be compared, and how. Each variable level is separated by >, and each dimension is separated by BY (up to three dimensions: Row, column, and layer). A + is used to separate two variables sets on the same dimension.

For instance, say you wanted to nest gender within age as the row variables, and cross-tab against the respondent's city. This would be your Table subcommand:

/TABLE = Age > Gender BY City

Note that the + sign separates variable sets, and nesting only applies to the two variables on either side of the >. That is, if you wanted to nest Gender within both age and language, this would not work:

/TABLE = Age + Language > Gender BY City

That would only nest gender within language. Instead, you'd have to do this:

/TABLE = Age > Gender + Language > Gender BY City

The Statistics subcommand specifies what statistics you want: counts or percents within specific slices (i.e., groups of variables). To get percents, specify the lowermost row variable before the format, and the variables making up the slice you want a percentage on. For instance, to get a row percent on the age > gender x city table, use this:

cpct( GENDER( PCT5.1 ) 'Row %':AGE GENDER )

To get a column percent on the same table, use:

cpct( GENDER( PCT5.1 ) 'Col %':CITY )

Note that if you use a layer, you should typically also specify the layer in the cpct specification. For instance, if your table specification is:

/TABLE = Age BY Gender BY City

Then your cpct specification should typically be:

cpct( AGE( PCT5.1 ) 'Col %':GENDER CITY )

Multiple response sets (advanced)

Multiple response sets allow you to treat a set of variables as a single variable. The primary use is to recreate a set of report banner points. (MRSets is part of Tables, a separate, add-on module. It is not covered in the basic SPSS Syntax Reference Guidethat SPSS publishes; rather, there's a separate reference guide called SPSS Tables. Tables may not be available to all users.)

Let's say your banner will have the following points:

The first thing to do is create a set of variables representing each point, using the recode function. The syntax is included here; you could also do this using the GUI (see that section).

COMPUTE ISRESP = 1.
COMPUTE ISMALE = (GENDER = 1).
COMPUTE ISFEMALE = (GENDER = 2).
COMPUTE UNDER35 = (AGE < 35).
COMPUTE OVER34 = (AGE > 34).

Now that these variables have been created, use one of the methods below to create a multiple response set, and then use the general table (above) or multiple response tables functions to use it as a banner.

GUI method

  1. Make sure that your desired weight and filter are turned on (or off).
  2. On the menu, select Analyze.
  3. Select Tables > Multiple Response Sets...
  4. In the dialog box, select the variables you want in the set. In the example, select ISRESP, ISMALE, ISFEMALE, UNDER35, and OVER34. Note that the order that you put them in the set will match the order they'll be analyzed in.
  5. Under Variables Are Coded As, click Dichotomies and enter 1 in Counted Value.
  6. Name the set (the example will be DEMOS), and provide a label (optional).
  7. Click Add.
  8. Click OK.

Syntax method

The basic syntax is:

MRSETS /MDGROUP NAME=$SetName LABEL='Set Label'
  VARIABLES=Var1 Var2 Var3 VALUE=1
  /DISPLAY NAME=[$SetName].

For instance, in our example:

MRSETS /MDGROUP NAME=$DEMOS LABEL='Demographic Variables'
  VARIABLES=ISRESP ISMALE ISFEMALE UNDER35 OVER34 VALUE=1
  /DISPLAY NAME=[$DEMOS].

To use this set in the TABLES command, you have to detail the set a second time. Note the differences in format from the MRSETS command. To use it as a banner:

TABLES /MDGROUP $SetName 'Set Label' Var1 Var2 Var3 ( 1 )
  /TABLE=Var4 BY $SetName.

For instance, to run the example banner against language spoken:

TABLES /MDGROUP $DEMOS 'Demographic Variables'
  ISRESP ISMALE ISFEMALE UNDER35 OVER34 ( 1 )
  /TABLE=LANGUAGE BY $DEMOS.

Return to Contents - Back to Data Manipulation - Continue to Interfacing with Excel