Survey Tabulation > Working with variables > Creating variables > Creating a summary statistic table > Creating a summary variable
 
Creating a summary variable
1 From the menu, choose Variables > New Advanced.
The New Variable dialog box opens: see New Variable dialog box.
2 Enter a name for the variable, for example, VisitsAndGroups.
3 Enter a description, for example, Questions on previous visits and numbers in group.
4 Select Categorical as the data type for the variable.
5 From the menu at the top of the Edit tab, choose Insert.
This opens the Insert Item dialog box (see Insert Item dialog box).
6 In the list of Available Items, select Numeric.
7 Click Add.
8 Repeat the last two steps as many times as you need to create a category for each variable that you want to summarize in the table. In this example, add four more numeric items.
9 Click OK.
This adds the categories to the list of items making up the variable, with a specification for each category of numeric(). You will change this so that each category references a different numeric variable.
10 For each new category, change the label to reflect the numeric variable that you want to base it on (for example, enter Number of previous visits for the category that you want to base on the visits variable).
11 Select the first new category and choose the Properties link to display the Element Properties dialog box (see Element Properties dialog box).
In the Calculate list, select the numeric variable on which you want to base the category, then choose OK to close the dialog box.
12 Repeat the previous step for each of the other new categories.
13 When you have finished, the specification for the variable is as follows (you can check this by choosing the Script tab):
{ base (), numeric1 'Number of previous visits' numeric (visits),
numeric2 'Number of visits in last 12 months' numeric (visits12),
numeric3 'Number of adults in informal group' numeric (adults),
numeric4 'Number of under 16s in informal group' numeric (under16s),
numeric5 'Number of under 11s in informal group' numeric (under11s) }
14 Click OK to save your changes and close the New Variable Dialog box.
You can now create a summary table of mean scores using the variable: see Creating a summary table of mean scores.
See also
Creating a summary statistic table