haya.Learning made clear
Unit III · Coding and tabulation of data
8 min readConcept sheetOften a 5- or 10-mark answer

Coding, data entry and computation

Coding turns each answer into a number using a codebook. The numbers are entered into a computer, checked, and used to compute totals, percentages and means.

Order of workEditing → coding → data entry → cleaning → computation → tabulation
CodebookLists each variable, its column and the code for every answer
Good categories (Kothari)Exhaustive, mutually exclusive, one idea each
Common softwareMS Excel, SPSS

From filled forms to results

Kothari lists the processing steps as editing, coding, classification and tabulation. Data entry and cleaning are added when a computer is used. Ranjit Kumar's coding steps: develop a codebook, pre-test it, code the data, verify the coding.

A small codebook (breakfast survey of college students)

ColumnVariableQuestionCodes
1IDRespondent number001-120, as written on the form
2YEARYear of study1 = I year, 2 = II year, 3 = III year, 9 = no answer
3SKIPDo you skip breakfast?1 = yes, 0 = no, 9 = no answer
4DIETDiet type1 = vegetarian, 2 = eggetarian, 3 = non-vegetarian, 9 = no answer
5WTWeight (kg)Actual value to one decimal; 999 = missing
6HTHeight (cm)Actual value; 999 = missing
7REASONWhy do you skip breakfast? (open)1 = no time, 2 = no appetite, 3 = dieting, 4 = food not liked, 5 = other, 8 = not applicable, 9 = no answer

Coding one form and computing BMI

Problem

Student 017 is in II year, skips breakfast because she has no time, is vegetarian, weighs 52.5 kg and is 158 cm tall. Code her form with the codebook above and compute her BMI.

Working
  1. ID = 017
  2. YEAR: II year → 2
  3. SKIP: yes → 1
  4. DIET: vegetarian → 1
  5. WT = 52.5; HT = 158
  6. REASON: 'no time' → 1
  7. Data row: 017 | 2 | 1 | 1 | 52.5 | 158 | 1
  8. BMI = weight (kg) ÷ height (m)² = 52.5 ÷ (1.58 × 1.58) = 52.5 ÷ 2.4964 = 21.0 kg/m²
Answer

Row 017, 2, 1, 1, 52.5, 158, 1. BMI 21.0 kg/m²: normal by the Asian Indian cut-off (18.5-22.9).

Rules for good coding and entry

  • Categories must be exhaustive (every answer fits somewhere) and mutually exclusive (each answer fits only one place).
  • Each category should cover one idea only.
  • Pre-code closed questions while designing the form; post-code open answers after reading a sample of them.
  • Give a fixed code for missing or 'not applicable' answers, such as 9 or 999.
  • Enter one row per respondent and one column per variable.
  • Run a frequency count to catch impossible values (YEAR = 5), and re-check a sample of forms or enter the data twice.
In nutrition research

In diet surveys, computation is a big step. Each food in a 24-hour recall is converted to nutrients using the Indian Food Composition Tables (IFCT 2017), then compared with the ICMR-NIN RDA to find the percentage of adequacy.

Exam angle

2 marks: “What is coding of data?” Coding is assigning numbers or symbols to answers so that they can be grouped into categories, entered into a computer and counted.

5 marks: “What is a codebook? Explain with an example.” A codebook lists each variable, its column, the question and the code for every answer, including missing values. Show four or five rows from a diet survey.

10 marks: “Explain the steps in processing data: editing, coding, data entry and computation, with an example.” Flow chart of processing; editing; coding rules and a small codebook; data entry and cleaning; computing BMI or nutrient intake; then tabulation.

Remember it

"Every Coder Enters Clean, Correct Tables" = Editing, Coding, Entry, Cleaning, Computation, Tabulation.