Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Keywords for data analysis > Statistical elements

Statistical elements
If you tabulate a standard numeric question in UNICOM Intelligence Reporter - Survey Tabulation or UNICOM Intelligence Reporter, the application displays base, mean and standard deviation elements, as well as elements showing the minimum and maximum values of responses. The base counts the number of people eligible to answer the question, and the other values come from or are calculated using the raw data held in the case data. If you want to see a more detailed breakdown of the answers, you can expand the question definition to include analysis elements that group the answers into ranges. When you do this, UNICOM Intelligence Reporter - Survey Tabulation no longer creates the statistical elements automatically so you must specify them manually in the question definition.
With categorical questions, the data contains codes that represent the answers chosen. These codes cannot be used in statistical calculations so you must specify a set of numeric values (called factors) that can be used in the statistical calculations instead. For example, to find the mean rating in a five-point rating scale you might assign factors ranging from 5 for Excellent to 1 for Very poor. The mean would then be calculated using the factors that represent each respondent’s rating. Thus, if one respondent rates the product as very good (4) and another rates it as satisfactory (3), the mean rating is 3.5.
The interview scripting language can request the following commonly used statistics:
mean (the sum of values divided by the number of cases)
standard deviation
standard error
sample variance.
You can define statistics by placing statements in an axis block or by adding Analysis elements to the main body of the response list. Using an axis block is the most straightforward method regardless of whether you are using raw data or factors in the calculations. It also allows you to request other statistics such as the median or mode (see Special elements and helper elements in metadata for details).
The general rules for defining statistics are as follows:
In an axis block, name the statistic you want and, if using raw data in a derived variable, the name of the question whose raw data is to be used in the calculations.
When using Analysis elements with factors, add Analysis elements for the statistics you want.
When using Analysis elements with raw data, add Analysis elements for the statistics you want and define hidden elements for the intermediate values required for those statistics (for example, sum-of-x (values) and sum-of-n (cases) for a mean).