Using Assisted Mode to define a variable (AskiaVista)

This topic describes how to define a variable using assisted mode, which provides a simple way to define variables. If you are familiar with AskiaScript syntax, you can also use script mode, which offers more power and flexibility.

In Assisted mode, you use a simple interface to build up your custom variable. This interface is easy to use, while allowing you to create fairly sophisticated variables. However, if you need to create even more more complex variables, you can do so using askiascript in script mode.

Example A: Variable based on a category question

Suppose we want to rate a new closed variable, bases on an existing question called Age. We need to create the categories in our new variable, and, for each one, define the appropriate criteria (e.g. we might combine two categories from the original question into a single category in our new one). We might set up our variable as follows:

Note that we have the responses on the left, and on the right, we are viewing the details of the first one: it stipulates that all respondents who answered less than 24 or 25-34 in the variable Age will be included in our first response, hence the label we have given our response, 18-34.

Example B: Variable based on a numeric question

Suppose we want to specify respondents who gave a value greater than 5 at the question Department. In our example, we have selected the question Department, then greater. Finally, we have entered the value 5:

Building your variable

If you are creating a Closed variable, you need to define each response in your new variable. These are shown in the left-hand pane (initially, there will be none, until you add some). You can change the order of the responses simply by dragging and dropping them. To select a response, simply click it.

In the left-hand pane, the following controls are available:

Command name Description

Create a new response

icn-add-variable-response-normal

Adds a new response to the list.

Remove response

icn-rm-variable-response-normal

Deletes the selected response.

Rename response

icn-rename(3)

Allows you to type a new name for the selected response.

 

To define the details of a response, select it. Then, in the right-hand pane, define your condition that determines what data is included in the response.

If you are creating a Numeric variable, you do not need to define a response list, so you simply need to define one or more conditions which determine the value of the question.

The process of defining a condition is the same for closed or numeric variables. To define a condition, first select the question on which you want to base it. Then, select an operator which determines what the respondent must have selected in order to satisfy the condition. Finally, select one or more responses from the source question.

The available operators depend upon the type of the question you select in your condition. For closed questions, they are:

For example, the following condition is true if the respondent is less than 35 years old:

For Numeric questions, the available operators are:

Multiple conditions

Your variable's definition can consist of several conditions. To add another condition, click +:

icn-add-cond-normal%281%29

You can define the relationship between each of these conditions (e.g. with two conditions, they might both have to be true, or only one of them may have to be true). Select the appropriate operator between the two conditions:

For example, the following condition is true if the respondent is aged 25-34 or 35-49 (in other words, if the respondent is aged 25-49):

To remove a condition, click - beneath it:

icn-remove-cond-normal%281%29

You can also create sub-conditions that combine to make conditions. To add a sub-condition, click + on the same row as the condition:

icn-add-cond-normal%281%29

To remove it, click - on the same row as the sub-condition:

icn-remove-cond-normal%281%29

As with conditions, you can control how two sub-conditions combine by selecting AND or OR.

Create your own Knowledge Base