Numeric by script (AskiaAnalyse)

This feature allows you to create a numeric variable using the functions of AskiaScript. You can use it to:

To access this feature, in the edit menu select create a variable... and select numeric by script. Drag individual questions from the question list in the left-hand pane into the script window, and make use of the functions in the contextual (right-click) menu. Enter the name of the new variable in the caption box.

Example A

If we wanted to select the number of answers given to a multi-coded question, in AskiaAnalyse we might enter:
SIZE(??Q1??)

Example B

If we wanted to transform a response value into a non-answer, we might enter:
ON(??Note??=99, DK, ??Note??)

Example C

Suppose we want to assign a value to each item of the question Q1 Satisfaction, as follows:

We would enter:

On(??Q1??=1,10,7,4,0)

We would then validate our script.

Example D

If we wanted to remove the value 99 from the numeric variable Q1, with values from 1 to 99, we would enter:

On(??Q1??= 99,NR,??Q1??)

Example E

If we wanted to carry out a calculation on two numerical variables: Q1 + Q2, we might enter the following:

Example F

If we wanted to find the middle number of the responses given to Q1 (a multi-coded question), we might enter:

SIZE(??Q1??)
Create your own Knowledge Base