2 Data Preperation
2 Data Preperation
Chapter Outline
1. Data Preparation
1. Missing value identification
2. Outlier detection
3. Variable re-specification
4. Transpose
14-3
Restaurant preference
A Codebook
Colum No Variable No. Variable name Question no. Coding instruction
1 1 ID 1 to 20 as coded
Input the number circle
1= weak preference
2 2 Preference 1 2= strong preference
Input the number circle
1= poor
3 3 Quality 2 2= excellent
Input the number circle
1= poor
4 4 Quantity 3 2= excellent
Input the number circle
1= poor
5 5 Value 4 2= excellent
Input the number circle
1= poor
6 6 Service 5 2= excellent
Input the number circle
1= less than 20000
14-5
Coding Questionnaires
The respondent code and the record number appear
on each record in the data.
The first record contains the additional codes: project
code, interviewer code, date and time codes, and
validation code.
It is a good practice to insert blanks between parts.
14-6
Data Transcription
Fig. 14.4
Raw Data
Computer Magnetic
Disks
Memory Tapes
Transcribed Data
Data Cleaning 14-7
Consistency Checks
Data Cleaning- includes consistency checks and treatment of missing response.
Consistency checks identify data that are out of range, logically inconsistent, or
have extreme values.
Computer packages like SPSS, SAS, EXCEL and MINITAB can be programmed
to identify out-of-range values for each variable and print out the respondent
code, variable code, variable name, record number, column number, and out-
of-range value.
Extreme values should be closely examined.
Data Cleaning 14-8
Weighting
Elementary School
0 to 7 years 2.49 4.23 1.70
8 years 1.26 2.19 1.74
High School
1 to 3 years 6.39 8.65 1.35
4 years 25.39 29.24 1.15
College
1 to 3 years 22.33 29.42 1.32
4 years 15.02 12.01 0.80
5 to 6 years 14.94 7.36 0.49
7 years or more 12.18 6.90 0.57
Variable Respecification
Variable respecification involves the transformation of data to create
new variables or modify existing variables.
E.G., the researcher may create new variables that are composites of
several other variables.
Dummy variables are used for respecifying categorical variables. The
general rule is that to respecify a categorical variable with K categories, K-
1 dummy variables are needed.
Statistically Adjusting the Data 14-12
Variable Respecification
Table 14.2
Nonusers 1 1 0 0
Light users 2 0 1 0
Medium users 3 0 0 1
Heavy users 4 0 0 0
Zi = (Xi - X )/sx
14-14
Dependence Interdependence
Technique Technique
SPSS Windows
14-21
SPSS Windows
Using the Base module, out-of-range values can be selected using the
SELECT IF command. These cases, with the identifying information
(subject ID, record number, variable name, and variable value) can
then be printed using the LIST or PRINT commands. The Print
command will save active cases to an external file. If a formatted list is
required, the SUMMARIZE command can be used.
SPSS Data Entry can facilitate data preparation. You can verify
respondents have answered completely by setting rules. These rules
can be used on existing datasets to validate and check the data,
whether or not the questionnaire used to collect the data was
constructed in Data Entry. Data Entry allows you to control and check
the entry of data through three types of rules: validation, checking, and
skip and fill rules.
While the missing values can be treated within the context of the Base
module, SPSS Missing Values Analysis can assist in diagnosing missing
values and replacing missing values with estimates.
TextSmart by SPSS can help in the coding and analysis of open-ended
responses.