# Session 2: Recoding and Crosstabulating

## Recoding variables

Examine the frequency distributions of different categorized variables, and
pick a variable to recategorize
(Transform/Recode/Into Different Variables). Avoid raising
the level of abstraction too high (ie. too few categories) so that you
don’t lose too much information. Save the command into the Syntax
window by clicking the “Paste” button, and make notes to yourself of
what kind of conversion you did. Remember to rename the value labels
of the variable.

## Cross-tabulation

Crosstabs (aka contingency tables) are used to examine two categorized
variables. You can also
use a continuous variable, but it needs to be categorized
first. (Categorizing a continuous variable will be covered on Day Three.)

Pick two variables that might be dependent on each other in a way that
one could be used to explain the other.
Create a crosstabulation (Analyze/Descriptive
Statistics/Crosstabs
) where the independent variable is the
row variable, and the dependent variable is the column variable. Select
the percentages along the direction of the independent variable.

How to interpret the resulting table? If there are a lot of cells with
zero count, reconsider the way the variable was recategorized. Think
of alternative ways to recategorize the variable without losing too much
information. Write down your interpretation from the final version of
the table.

## Clustered Bar Graphs

Draw a bar graph based on the crosstabulation you did in the previous
exercise (Graphs/Legacy Dialogs/Bar/Clustered). The independent variable
goes into the slot labelled Category Axis and the dependent
variable needs to be inserted in the field marked Define Clusters
by
. Examine the frequencies and write down your interpretation of
the resulting graph.

## The Chi-square Test

Conduct the Chi-square test on the crosstabulation from today’s second exercise,
and think about its interpretation. You may also use some alternate
variables. Write a short analysis based on your interpretations.

## Layered Crosstabs

Make a layered crosstab based on the table you made in exercise 2. You
can use a background variable such as gender(gndr), for example. Write a