Server User Guides > Survey Tabulation > Working with variables > Adding summary statistics to a categorical variable
 
Adding summary statistics to a categorical variable
Sometimes you might want to add a summary statistic to a categorical variable: for example, to show the mean score in a rating question. When you do this, by default the statistic is calculated on the basis of factors associated with the categories. Alternatively, you can base the calculation on a specific numeric variable.
A factor is a constant numerical value that is assigned to a category for use in statistical calculations. Factors are used when you want to base a statistic on the categories in a categorical variable rather than on a numeric variable. This is because statistics can be calculated on numeric data only and categories are not true numeric values. (Although the Data Model represents the responses to categorical questions as numeric values, these are in fact identifiers or codes and are not suitable for statistical analysis.)
These instructions describe how to add summary statistics so that they apply to all tables that use the variable. If you want to add the statistics to a specific table, use the Edit Axis dialog instead of the Edit Variable dialog. The steps within the dialog are the same. See Edit Axis dialog for more information.
Adding a summary statistic to a categorical variable for all tables
1 In the main UNICOM Intelligence Reporter - Survey Tabulation window, select the Define tab.
2 In the Variable List, select the categorical variable, and then click Variables > Edit.
The Edit Variable dialog opens: see Edit Variable dialog.
3 Select the item in front of which you want the summary statistic to appear. To add the statistic at the end, do not select anything.
4 From the menu at the top of the Edit tab, choose Insert.
The Insert Item dialog opens: see Insert Item dialog.
5 In the list of Available Items, select the summary statistic that you want to use. For example, select Mean or Standard Deviation.
6 Click Add, and then click OK.
This inserts the statistic into the list of items on the Edit tab and automatically assigns factors to all of the categories, including user-defined categories, in the list. A factor of 1 is assigned to the first one, a factor of 2 to the second one, etc. However, you can change the factors if necessary.
7 When you have finished inserting statistics, click OK to close the Edit Variable dialog.
Changing the factor assigned to a category
1 After inserting a summary statistic in the Edit Variable dialog, select the category for which you want to change the factor.
2 From the menu at the top of the Edit tab, choose Properties. The Element Properties dialog opens: see Element Properties dialog.
3 Enter the required value in the Factor box, and then click OK.
The changes will be applied to any existing tables that include the variable next time you populate them, provided you have not used the Edit Axis dialog (see Edit Axis dialog) to specify how the variable is to appear in any of those tables.
See also
Working with variables