Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Keywords for data analysis > Defining analysis requirements
Defining analysis requirements
Each question in an interviewing script becomes a variable in a tabulation application. If you are happy with the default variables that you get from simply opening an interviewing project with an analysis application, you need not make any additions to your standard interviewing script. The default variables produce the following output in analyses:
Question type
Output in tables
A base and then one element (row or column) for each response in the response list.
Numeric (long and double)
UNICOM Intelligence Reporter - Survey Tabulation and Survey Reporter generate a base, mean and standard deviation, as well as elements showing the minimum and maximum values for the variable. If you are writing tables (TOM) scripts, you must specify these elements yourself.
A base and an element for those with a True/Yes response.
Cannot be tabulated in its raw form, but can be displayed in profiles.
Cannot be tabulated in its raw form, but can be displayed in profiles.
Changes that you might want to make for analyses include:
Different response texts for interviewing and analysis.
Grouping numeric data into categorical ranges (bands) so that the data can be used more easily in tables.
Grouping text or date/time data so that it can be tabulated.
Assigning factors to categorical responses such as rating scales so that an average rating can be obtained.
Calculating totals and subtotals for numeric data.
Creating additional elements that appear only in analyses; for example, a “top two” element that counts answers in the top two categories of a rating scale.
Redefining the base for percentages and statistics so that it includes everyone who answered the question rather than everyone who was asked it.
Creating new variables by combining data for two or more questions; for example, a combined gender and age question built from the responses to the individual gender and age questions.
Creating new variables that add up numeric answers given by respondents to a particular question rather than by counting the number of respondents giving those answers (for example, the number of children that people in various age groups have rather than the number of people in each age group, or the number of visits made to various shops rather than the number of people visiting each shop).
There are two ways of specifying your analysis requirements in an interviewing script:
Define an axis block
This is a section that appears at the end of the response list and defines all the elements that you want to see in tables. The advantages of the axis block are that you can use it in any type of question, and it keeps all analysis specifications together, making it immediately clear which statements apply to interviewing and which to analysis.
The syntax for an axis block is:
QName 'Text' Type [Responses]axis( "{ element definitions }" )
If you use UNICOM Intelligence Professional for building and testing scripts, it does not check the syntax of anything inside an axis block, so any syntax or other errors are not apparent until you use the question in analyses.
Use Analysis elements
You can place analysis-specific elements amongst interview responses in categorical response lists and the interviewing program will ignore them. Analysis-only elements contain an elementtype parameter that defines how the element will be used in tables. The advantage of this approach is that you never have to define a response more than once; however, you usually need to define an expression for each element that specifies who should be included in the element or how its counts should be created.
UNICOM Intelligence Professional checks this type of element definition when you save the script, so if there are syntax errors they are picked up before you run the script.
Usually the two methods are interchangeable, but sometimes they are not.
See also
Axis block or analysis elements?
Keywords for data analysis