Sub-population definition: advanced mode example (AskiaAnalyse)

Advanced mode provides a powerful, flexible way to define sub-populations using AskiaScript.

To define a condition in advanced mode:

  1. Drag the questions or items to which you will apply a condition into the condition window.

  2. Click save%20from%20icon(1) to save your condition.

  3. Click OK to close the sub-population window.

Example: Sub-population created from a category question

Suppose we have a category question, with one possible answer, Men.

The expression we require is ??Gender??=1.

We double-click the question and drag it into the sub-population window, and add the expression ':1'. The screen appears as follows:

You can use the following operators in your expressions.

Logical operators

Between two (or in the case of NOT) before one boolean value

OPERATOR DESCRIPTION

AND

Logical and (must be both)

OR

Logical or (must be one or the other or both)

NOT Logical not (the inverse of the condition)

 

Mathematical operators

Between two numerical values

OPERATOR DESCRIPTION

>

Greater than

<

Less than

=

Equal to

+

Add

-

Subtract

*

Multiply

/ Divide

 

Miscellaneous syntax

Syntax DESCRIPTION
( ... ) Parentheses may be used to change the priority order of combinations or to simplify readability.
{ ... }

Braces are used to define a set of values associated with a multiple response question, e.g.  {1;2;3}

??...?? Two question marks either side of a name indicate a variable name, e.g. ??Age??

See also

Create your own Knowledge Base