![]() |
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:
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
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
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
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
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