• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
      • Introduction to Data Dictionary
      • Organization
      • Dictionary Concepts
        • General
        • Levels
        • Records
        • Items
        • Value Sets
          • Value Sets Description
          • Value Set Properties
          • Value Set Images
        • Values
        • Relations
      • Data Dictionary Application
      • How to ...
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Value Sets Description

Creating value sets in the dictionary controls the valid range (for numeric) or valid set of values (for numeric and/or alpha) that a dictionary item (or subitem) can have. Value sets play a key role in CSPro, in particular for numeric items, and should always be created unless there is a strong reason not to do so.
Some of the uses they serve include:
  • During the design phase, as a tool of discussion with subject-matter specialists
  • During data entry, to control what values can be entered
  • During data entry, to present a list of valid responses from which the enumerator can choose
  • Within batch edit applications, to enable usage of the impute function's valueset option
  • Within tabulation applications, to facilitate table creation
  • To generate code books, useful when exporting a datafile to other formats (e.g., R, SPSS, SAS, and Stata)
  • As documentation to explain the characteristics of the data for future reference
As mentioned above, value sets are especially useful during data entry, in particular for numeric items. For example,
  • A data item of field width 1 would allow values 0-9 to be entered—not likely useful for non-zero identification items
  • A data item of field width 1 would allow values 0-9 to be entered—not likely useful for dichotomous responses such as Yes/No or True/False that expect 1 or 2
  • A data item of field width 2 would allow values -9 to 99 to be entered—also not likely useful for continuous variables such as age that cannot be negative
Similarly, for alpha variables, and in particular for alpha variables of length 1 that are meant to capture A, B, C, etc. type of responses, failing to create a value set to list the specific letters allowed would end up allowing any character—blanks and punctuation characters included.
As can be seen in the first example below, each dictionary item can have more than one value set. In addition, if multiple languages are defined for the dictionary, there can be more than one value set for an item—though note this does not actually create distinct value sets, as they will share the same unique value set name. It only allows you to create value sets in different languages in order to switch between/among them.
Example 1
For example, suppose you have a survey that needs to classify people's ages three different ways: by discrete value, by 5-year cohorts, or by category, such as "Child," "Adult," etc. This is easily done by adding value sets for the AGE data item:
Value Set Label  Value Set Name  Value Label         From  To
Age              AGE
                                                     0     98
                                 Not Reported        99
Age by 5 years   AGE_5YRS
                                 0 to 4 years        0     4
                                 5 to 9 years        5     9
                                 10 to 14 years      10    14
                                 15 to 19 years      15    19
                                 20 to 24 years      20    24
                                 25 to 29 years      25    29
                                 30 to 34 years      30    34
                                 35 to 39 years      35    39
                                 40 to 44 years      40    44
                                 45 to 49 years      45    49
                                 50 to 55 years      50    54
                                 55 to 59 years      55    59
                                 60 years and over   60    98
Age by Category  AGE_CATEGORY
                                 Infant              0     0
                                 Child               1     12
                                 Teenager            13    19
                                 Adult               20    59
                                 Senior              60    98
The AGE item now has three defined value sets: AGE, AGE_5YRS, and AGE_CATEGORY. The first value set defines the acceptable range for data entry, while the second and third value sets give a breakdown as you might want to see the data tabulated.
Each new value set will always be added to the end of the item's value set listings. If you add to the wrong place, press the Esc key to stop the add. Use undo if you added at the wrong place. Likewise, you can also just cut (Ctrl+X) the value set and paste (Ctrl+V) it to the desired position. If a value set is not in the first position but you need it to be, you can make it the primary (first) value set by right-clicking on the Value Set Label/Value Set Name row and selecting the "Make Primary Value Set" option.
Example 2
Continuing with the above value set, suppose the AGE_5YRS ranges were already entered elsewhere such as in an Excel file. You could simply copy the labels and ranges and paste it directly into the value set screen, saving you the effort of retyping it.
Example 3
Suppose you needed to tabulate age by single years: 0 to 99. It would be very tedious to create that value set. Instead, you could use the Generate Value Set tool to create this numeric value set.
See also: Value Set Properties, Value Set Images, Value Description, Implications of Data Dictionary Value Sets, Multiple Language Dictionaries