Set Source Instrument#

Each variable in a dataset can record the questions from which its data were collected. These are the variable’s source questions, and they link the dataset description to the survey instrument. Source questions can be set one variable at a time in the variable editor, but for a dataset with many variables this is tedious.

The Set Source Instrument command assigns source questions to every variable in a dataset at once. You choose a survey instrument, and Colectica Designer matches each variable to a question or question grid in that instrument by name.

Assign Source Questions from an Instrument#

  1. Navigate to a dataset.

    ../../../../_images/browse-data.png
  2. Click the Set Source Instrument button in the Advanced area of the ribbon.

  3. In the item chooser, select the survey instrument that was used to collect the data, and click OK.

  4. Colectica Designer compares the name of each variable to the names of the questions and question grids in the instrument, as described below. When a match is found, the question or question grid is added to the variable’s source questions.

  5. When the command finishes, a summary is displayed showing:

    • the number of source questions that were assigned

    • the number of variables that already had a matching source question, and were left unchanged

    • the number of variables for which no matching question was found, followed by the list of names that could not be matched

  6. Review the changes and click Save to keep them.

The command only adds source questions. It never removes source questions that a variable already has, so it is safe to run more than once, or to run with several different instruments.

Matching Rules#

Variables are matched to questions and question grids using the following rules.

  1. The variable name is used for matching. Colectica uses the variable’s name, not its label. If the name is entered in more than one language, the name in the current metadata language is used.

  2. Anything after the first underscore in the variable name is ignored. If the variable name contains an underscore, only the part before the first underscore is used for matching. For example, the variables Q12_1, Q12_2, and Q12_other are all matched using the name Q12. This allows the several variables produced by a multiple-response question or a question grid to be matched to the single question that produced them. A variable name that begins with an underscore is used as is.

  3. The name must match a question or question grid name exactly. The shortened variable name is compared to the name of each question and question grid in the instrument. The comparison is case sensitive, and the names must match in full. For example, the variable q12 does not match the question Q12, and the variable Q12a does not match the question Q12.

  4. All questions and question grids in the instrument are candidates. The instrument is searched in full, including every sequence and nested sequence, so a question can be matched wherever it appears in the instrument. Questions that are not used in the chosen instrument are not considered.

  5. Questions are preferred over question grids. If both a question and a question grid have the matching name, the question is assigned and the question grid is ignored.

  6. Only the first match is used. If several questions in the instrument share the matching name, only the first one found is assigned as the source question.

  7. Existing source questions are preserved. If the variable already has a source question or source question grid with the matching name, the variable is left unchanged and is counted as previously assigned in the summary. Any other source questions the variable already has are also kept.

Variables that cannot be matched are left unchanged and are listed by their shortened name in the summary. You can assign source questions for these variables manually in the variable editor, or rename the variables or questions so that they match and run the command again.

Example#

Consider an instrument containing the questions AGE, INCOME, and HEALTH, and a question grid named ACTIVITY.

Variable name

Name used for matching

Result

AGE

AGE

Matched to the question AGE.

INCOME_bracket

INCOME

Matched to the question INCOME.

ACTIVITY_1

ACTIVITY

Matched to the question grid ACTIVITY.

ACTIVITY_2

ACTIVITY

Matched to the question grid ACTIVITY.

health

health

Unmatched, because names are case sensitive.

WEIGHT

WEIGHT

Unmatched, because the instrument has no question with this name.

See also

Generate a Dataset Description from a Survey Instrument creates a dataset description from an instrument, with source questions already assigned.