Variable Names

In the Variable Name box on the Data Element tab, enter the Data Element variable name. Variable names must begin with a letter, be no longer than 32 characters (SPSS v6.1 and SAS Transport file format have 8 character limit), and contain only letters, digits, underscores, and/or Substitution Tokens. This ensures compatibility with output file requirements when data is exported from the Warehouse Manager. (e.g., SAS XML, SPSS, Stata, and MS Access formats).

Variable Name box

  • Examples of valid names: INTERVIEWDATE, GENDER, INTDT, NAME, DOB, LAST30, MM_YY
  • Examples of invalid names: 30DAYS, MM/YY, AMOUNT$

Tip: By default, the name “V&Q” is automatically listed in the Variable Name box. The "V&Q" should always be replaced with your own variable names. QDS will issue a validation warning if the default "V&Q" name is not replaced.

You will need to provide your own unique variable names because the default variable names are related to the question number (e.g., the default variable name for Question #1 would be VQ1, where "Q1" is the substitution token for the question number). If the question order is changed or new questions are inserted, variable names will change accordingly. This can cause confusion because identical variable names could correspond to different data items in each version of your questionnaire. For instance:

Survey Version 1

  • Q1. Subject ID: VQ1
  • Q2. Gender: VQ2
  • Q3. Age: VQ3

Survey Version 2

  • Q1. Subject ID: VQ1
  • Q2. Gender: VQ2
  • Q3. Race/Ethnicity: VQ3
  • Q4. Age: VQ4

In the example above, the Race/Ethnicity item was inserted between the Gender and Age questions, causing the question numbers and variable names to adjust accordingly. The result is a variable named VQ3 in both versions, but, in Version 1, VQ3 contains Age information, and in Version 2, it contains Race/Ethnicity data.

Often, variables are named to reflect item content. For example, the interview date variable might be named INTDT. You can see how this eliminates the problems in the previous example:

Survey Version 1

  • Q1. Subject ID: SUBJECT
  • Q2. Gender: GENDER
  • Q3. Age: AGE

Survey Version 2

  • Q1. Subject ID: SUBJECT
  • Q2. Gender: GENDER
  • Q3. Race/Ethnicity: RACE
  • Q4. Age: AGE