To demonstrate these points we may consider the example of a questionnaire administered to an individual (or ‘informant’ or ‘respondent’) in a social survey. In most social surveys the majority of questions are closed, that is, the range of permissible answers is predetermined. For example, suppose there was a question in a survey on voting behaviour which asked, ‘If there were an election tomorrow, which political party would you vote for?’ Usually, the range of permissible answers would be printed on the questionnaire under the question, in the following manner:
Would not vote
If the respondent replied ‘Republican’ to the question, the interviewer would circle the number 1 next to ‘Republican’. In so doing, the question is coded: for this question, all those answering Republican are given the value of 1. Their responses have thus been measured and will eventually be entered into a data-set.
However, some questions are open; that is, the range of answers is not predefined, because they cannot so easily be predicted. For example, the question on voting behaviour might be followed by one which asked ‘Why would you vote for the (Republican) Party?’ A space is left below the question for the interviewer to write down the respondent's answer verbatim. The researcher must then analyse a sample of the answers given in order to establish a coding frame. This frame will serve as a means for distinguishing different types of answer. Imagine that the following frame is devised:
Likes particular policies of party
Likes ideals of party
Always votes for the party
Dislikes policies of other party
Likes party leaders
Wants a change of government
This frame is then given to an experienced coder, along with the frames for all other open questions. The coder reads each respondent's answer to the question and has to decide to which one of the code-frame categories each answer most closely approximates. For example, if the respondent had said ‘Because I believe in cutting taxes and controlling welfare spending’, the coder would circle 1, since the respondent is answering in terms of Republican party policy. Hence coding is the first step in processing data.
Much of the coding work in sample surveys is done by the interviewer, but some has to be done after the interview by trained coders, during so-called office coding. When a questionnaire has been completely coded the numeric codes are entered into a computer for eventual analysis. Every act of coding—whether by interviewer or office coder—is a measurement, that is, the assignment of a numeral for an answer, according to some rule. The rules are provided by the pre-coded question (to which only one answer is possible), or by the coding frame for open questions, where the coder selects the appropriate code for the answer. This can, of course, then lead to measurement error. The interviewer might circle the wrong answer or the coder might ascribe the wrong code. For this reason, editors are employed to check the work of interviewers and coders, and computer edit-checks are used to search for inconsistencies in the data (for example, out-of-range codes, double-coding, and so forth). These methods serve as a check on the reliability and validity of the data.
Coding is essential for the analysis of responses to surveys and most questionnaires provide space for the codes connected with each reply. However, coding can be applied to other types of information, such as depth interviews or observed interactions, and it is an important aspect of conversation analysis. When qualitative coding is applied to the substantive content of communications, such as newspapers or political speeches, it is called content analysis. See also ERROR (SAMPLING AND NON-SAMPLING).