The Tally Attributes (Variable) Dialog Box allows you to choose which additional calculations should be displayed for a variable in a table. Using Tally Attributes (Variable), you can display totals, percents and summary statistics for each variable in the table.
To bring up the Tally Attributes (Variable) Dialog Box, right-click on a stub or column header for the variable whose attributes you wish to modify and choose "Tally Attributes (<Variable Name>)".
Unlike the Tally Attributes (Table/Subtable) Dialog Box, the settings made in the Tally Attributes (Variable) Dialog Box apply to the chosen variable and not to the rest of the table or subtable.
The Tally Attributes (Variable) Dialog Box contains two lists: on the left is the list of available calculations and on the right is the list of calculations selected for the current variable.
To add a new calculation, select the type of calculation in the list on the left by clicking on it and then click the "Add" button. The selected calculation will appear in the list on the right.
Each calculation has its own set of options such as percent type for percents, number of tiles for n-tiles, etc. To modify the options for a calculation, first select the calculation by clicking on it in the selected list, and then click the "Options" button to bring up the options dialog box.
To remove an existing calculation, click on the calculation in the list of selected calculations on the right and click the "Remove" button. The calculation will be removed from the list of selected calculations.
The order that the calculations appear in the selected list will be the same order in which they appear in the table. That is, if you have 'Total' before 'Median' in the selected list, then in your table, you will have a "Total" row or column before the row/column containing the median. To change the order of the calculations, choose a calculation in the selected list by clicking on it and click either the "Up" or "Down" button to change its position in the list.
The following calculations are available:
Counts: Displays the counts (frequencies) for each value in the value set. Adding counts to the variable will add a row or column to the table corresponding to each value in the value set for the variable.
Total: Displays a single row or column with the total for all values in the value set.
Percents: Displays the counts for the variable as percentages of the row total, column total or subtable total. Adding percents to the variable will add a row or column to the table for each value in the value set for the variable, but unlike 'Counts', the results are displayed as percentages. Percents have the following options:
Type: Selects how to calculate percents for the selected variable. Specifically, this gives the 'base' (100%) or denominator for the percent. One of three options can be selected:
Total - use the total count for the subtable as a base for each percent.
Row - use the total count for the subtable row as the base for the percents in each row. If there is a total column, it will contain '100 %'s.
Column - use the total count for the subtable column as the base for percents in each column. If there is a total row, it will contain '100 %'s.
Interleaved/Separate: Selects whether or not the percents are alternated with the counts. For percents to be interleaved, counts must be present directly before or directly after the percents in the selected list. When percents and counts are interleaved, the order in which the counts and percents appear in the selected list determines whether the first column/row will be a percent or a count -- i.e., if counts appear first in the selected list, then the first row or column will be a count followed by a percent.
Interleaved percents
Separate percents
Total Percent: Displays a single row or column with the total for all values in the value set expressed as a percentage of the row, column or subtable total. Total percent has the following options:
Type: The type of percent (row, column or total as for percents above). You may also choose '(same as percents)' to force the total percent to use the setting from the percents.
Mean: Displays the arithmetic mean (average) for each row or column.
Median: Displays the median for each row or column. Median has the following options:
Type: Specifies the type of variable – either discrete or continuous. This should be set to "Discrete" for discrete variables (such as number of rooms) and to "Continuous" for continuous variables (such as age or income). The median is approximated using linear interpolation based on a frequency distribution for the variable. For discrete variables, 0.5 is subtracted from the result to reflect the fact that values in a category are all equal to the lower limit of the category whereas for continuous variables values in a category are in between the lower and upper limits of the category.
Calculation ranges: Controls which frequency distribution is used to calculate the median. If "Use value set ranges for calculation" is checked, then the median will be approximated using a frequency distribution for the value set that was dropped onto the table. Otherwise, you can specify the ranges to use for the distribution by entering the min, max and interval. CSPro will generate ranges of width 'interval' starting at 'min' and going up to 'max'. For example, a "min" of 0, "max" of 20 and "interval" of 5 will generate the following four ranges:
0 up to but not including 5
5 up to but not including 10
10 up to but not including 15
15 up to but not including 20
If the value set you use does not have very many ranges, it is better to generate your own ranges in order to get a closer approximation of the median. For example, using a value set with only three categories for age such as 0-14, 15-49 and 49+ will generally result in a very poor approximation of the median, while using 5-year groupings will generally result in a good approximation. For an even better approximation, turn off "Use value set ranges for calculation" and specify a min of 0, a max of the largest age in the population and an interval of 1. For variables such as "income" or "price of a house", you may need to experiment with different sets of ranges to come up with a good approximation for the median.
Mode: Displays the mode (value with the greatest number of occurrences in the data set) for each row or column.
Standard deviation: Displays the standard deviation for each row or column.
Variance: Displays the variance for each row or column.
N-tiles: Displays percentiles for each row or column. N-tiles has the following options:
Number: Sets the percentiles to show. Set it to 4 for quartiles, 5 for quintiles, etc.
Calculation ranges: Controls which frequency distribution is used to calculate the n-tiles. If "Use value set ranges for calculation" is checked, then the n-tiles will be approximated using a frequency distribution for the value set that was dropped onto the table. Otherwise, you can specify the ranges to use for the distribution by entering the min, max and interval. CSPro will generate ranges of width "interval" starting at "min" and going up to "max". For example, a "min" of 0, "max" of 20 and "interval" of 5 will generate the following four ranges:
0 up to but not including 5
5 up to but not including 10
10 up to but not including 15
15 up to but not including 20
If the value set you use does not have very many ranges, it is better to generate your own ranges in order to get a closer approximation of the n-tiles. For example, using a value set with only three categories for age such as 0-14, 15-49 and 49+ will generally result in a very poor approximation, while using 5-year groupings will generally result in a good approximation. For an even better approximation, turn off "Use value set ranges for calculation" and specify a min of 0, a max of the largest age in the population, and an interval of 1. For variables such as 'income' or 'price of a house', you may need to experiment with different sets of ranges to come up with a good approximation for the n-tiles.
Minimum: Displays the minimum value for each row or column.
Maximum: Displays the maximum value for each row or column.
Proportion: Displays the proportion of a specified subset of the counts for the variable as a percent or ratio of the total for the variable. You could also use proportion, for example, on the age variable, to display the percentage or fraction of the population with age between 15 and 49. You could also proportion on a yes/no variable such as 'owns a television' to show the percentage or fraction of the population that owns a television. The proportion is calculated by taking a subset of the values in the value set for a variable, computing the total for that subset and then dividing that total by the total for all values in the value set. The result may be displayed as a percent or as a ratio. The numerator used to calculate the proportion is the total number of values that match the specified subset of the value set and the denominator is the total number of counts for all values in the value set. For example, in the case of the proportion of people between 15 and 49, the numerator would be the total number of people between 15 and 49 and the denominator would be the total number of people of any age.
Proportion has the following options:
Type: The type of proportion to display. It may be one of the following values:
Percent: Adds a single row or column to the table showing the counts for the values selected in the range as a percentage of the total.
Percent & Total: Adds two rows/columns to the total: the first showing the percent as above and the second showing the total number of counts for the values selected in the range (i.e., the numerator used to calculate the percent).
Ratio: Adds a single row or column to the table showing the counts for the values selected in the range as a fraction of the total.
Ratio & Total: Adds two rows/columns to the total: the first showing the ratio as above and the second showing the total number of counts for the values selected in the range (i.e., the numerator used to calculate the fraction).
Range: Specifies the set of values whose counts will be used in the numerator of the percent or ratio and as the total. Range can be a single value (e.g., 3), multiple values separated by commas (e.g., 1, 2, 5, 17) and it may also include value ranges using colons (e.g., 1, 2, 5:10, 25:30).
To show the percentage of the population between 15 and 49 you would add "proportion" to the age variable, set the type to "Percent" and set the range to 15:49. To show the fraction of the population that owns a television, add "proportion" to the variable "owns a television", set the type to "Ratio" and the range to 1 (assuming 1 means "yes").
Note that the values calculated for median, mode and n-tiles are dependent on the value set used. For more information see Implications of Data Dictionary Value Sets.
See Also: Hide or Change the Position of the Total, Add Percents to a Table, Add Summary Statistics to a Table