Data editing > Your Quantum program > Components of a program > Checking and verification statements
 
Checking and verification statements
Quantum enables you to check and verify data prior to tabulation. For example, a questionnaire might contain a series of questions to be answered only by people buying a specific brand of tea. You might want to check that everyone who did not buy tea has a blank in all columns related to tea. On the other hand, if they did buy a specific brand of tea, you can check whether the codes in the following columns are in a specific range.
The statement that you use for this type of test is require.
More generalized checking facilities enable you to produce frequency distributions of numeric data (for example, how many respondents have the number 201 in columns 13 to 15) or holecounts (marginals) which show the broad pattern of coding across all columns in the data. Words associated with these are list and count.
Example
if (c24'1') r nb c(25,30); else; r b c(25,30)
This says that if column 24 contains a ‘1’, then columns 25 to 30 must not be blank, otherwise, if column 24 does not contain a ‘1’, then columns 25 to 30 must all be blank.
See also
Components of a program