Codebook
Reporter: Diana Isla Aquino
What is a codebook?
Purpose of a codebook
Variable Name
Variable Column Location
Variable Label
Missing Data Code
Code Value
Value Label
1. Variable Name
Indicates the variable number or
name assigned to each variable
in the data collection.
2. Variable Column
Location
3. Variable Label
Indicates an abbreviated
5. Code Value
Indicates the code values
6. Value Label
variables
assigning numbers to each of the
possible responses
Example of a Codebook
Variable
Coding instructions
Identification number
ID
Sex
Sex
1 = Males
2 = Females
Age
Age
Age in years
Marital status
Marital
1
2
3
4
5
6
Optimism Scale
items 1 to 6
op1 to op6
=
=
=
=
=
=
single
steady relationship
married for the first time
remarried
divorced/separated
widowed
Variable names:
must be unique
must begin with a letter (not a number)
cannot include full stops, spaces or
symbols (! , ? * )
cannot include words used as commands
by SPSS (all, ne, to, le, lt, by, or, and, not,
with)
CODING RESPONSES
Note: Each response must be
assigned a numerical code before
it can be entered into SPSS.
Example of a Codebook
Variable
Coding instructions
Identification number
ID
Sex
Sex
1 = Males
2 = Females
Age
Age
Age in years
Marital status
Marital
1
2
3
4
5
6
Optimism Scale
items 1 to 6
op1 to op6
=
=
=
=
=
=
single
steady relationship
married for the first time
remarried
divorced/separated
widowed
Example:
What is your current marital status? (please
tick)
single in a relationship married
annulled
To code responses to the question above: if
a person ticked single, they would be coded
as 1(1=single); if in a relationship, they
would be coded 2 (2=in a relationship); if
married, 3 (3=married); and if annulled, 4
(4=annulled).
CODING OPEN-ENDED
QUESTIONS
Example: