Chapter 11. Preparing and Managing Data
11.1 Create a data dictionary
A data dictionary lists variable name, label, type, allowable values, units, missing-value codes, source, transformation and analysis role. Use short stable variable names, such as support_1, engagement_total, tenure_years and work_mode. Keep a separate codebook explaining category codes. Never rely on memory to explain what a value means.
11.2 Data cleaning sequence
- Preserve an untouched, read-only copy of the raw export.
- Check the number of rows and columns against expected counts.
- Inspect variable names, types, labels, categories and date formats.
- Check duplicate records and define the rule for handling them.
- Check eligibility and apply documented exclusion rules.
- Inspect missingness by variable and respondent; distinguish legitimate skips from nonresponse.
- Check impossible values, out-of-range values, inconsistent units and logic violations.
- Verify reverse coding and composite score calculations against the instrument manual.
- Inspect distributions, unusual values and influential cases without automatically deleting them.
- Save a reproducible syntax/script and log every change.
11.3 Missing data
First determine the amount, pattern and plausible mechanism of missingness. MCAR means missingness is independent of observed and unobserved data; MAR means missingness can be explained by observed information; MNAR means missingness depends on unobserved values even after observed information is considered. These mechanisms cannot usually be proven from a simple test. Complete-case analysis may be biased and inefficient. Depending on the context, options include multiple imputation, likelihood-based methods, weighting, or sensitivity analyses. State assumptions and follow the university's approved plan.
11.4 Outliers and influential observations
An outlier may be a data-entry error, a legitimate rare case, or evidence that the model is misspecified. Verify source records where possible. Do not delete observations solely because they change a p-value. Report justified exclusions and consider robust methods or sensitivity analyses. In regression, distinguish unusual outcome residuals from high-leverage observations and influential cases.
11.5 Composite scores
Follow the scale's established scoring instructions. Specify whether a sum or mean is used, the minimum number of completed items, treatment of reverse-coded items, and missing-item rules. Do not create a composite merely because several items correlate. If the scale is multidimensional, a single total score may conceal important distinctions.