Creating frequency tables

This tutorial covers the steps for creating frequency tables in StatCrunch. To begin, load the Two Categorical Variables data set, which will be used throughout this tutorial. This toy data set contains only two columns of data. The data in the var1 column, which will be used in this tutorial, contains 10 total values with the value b in the first four rows and the value a in the last six rows.

Creating a frequency table of a column

StatCrunch can produce a frequency table containing various statistics related to the frequency (count) and/or relative frequency (proportion) of values in a selected column. As an example, to create a frequency table of the data in the var1 column, choose the Stat > Tables > Frequency menu option. Select the var1 column and click Compute!. The resulting frequency table is shown below containing the frequency and relative frequency for the a and b values.

Specifying the statistics to include in the table

StatCrunch offers a number of options for statistics to display in the frequency table. The options include Frequency, Relative frequency, Cumulative frequency, Cumulative relative frequency, Percent of total and Cumulative percent of total. For example, to alter the output above to only display the relative frequency for each value, choose Options > Edit to reopen the frequency table dialog window. Change the Statistic(s) options by deselecting Frequency and then click Compute!. This option can be deselected with a Ctrl+Click on Windows or Cmd+Click on a Mac. Alternatively, the mouse can be clicked and dragged to select the desired options. The resulting frequency table shown below only displays the relative frequency for each value.

Changing the ordering of values

Under the Order by option, StatCrunch offers a number of different methods for ordering the values. The default Value Ascending ordering places the a value before the b value in a standard alphabetical *a to z* ordering. The Value Descending method reverses this ordering. For example, in the window containing the resulting frequency table above, choose Options > Edit to reopen the frequency table dialog window. Change the Order by option to Value Descending and press Compute!. Now the b value is placed before the a value. Note this is also the case if Worksheet order is used since b appears before a in the var1 column. The Count Ascending and Count Descending options can be used to order the values on the based on the frequencies associated with the values rather than the values themselves. In this example, changing to the Count Descending option will revert the values back to the original ordering because the a value has a higher frequency than the b value in the var1 column. Also note that the ordering selected can have a big impact on any cumulative statistics that are included in the display because these cumulative values are computed starting from the top value and moving downward.

Combining all values with small relative frequencies into a single Other* category

In situations where a selected column has a few values which occur frequently and a larger number of values that do not occur often, the resulting frequency table can be quite unwieldy with a large number of rows. In such cases, it is often times advantageous to combine the values with low relative frequencies into a single Other* category using the "Other*" if percent less than option in StatCrunch. To illustrate, in the window containing the resulting frequency table above, choose Options > Edit to reopen the frequency table dialog window. Change the "Other*" if percent less than option to 50 and click Compute!. In this case, the b value is simply relabeled as Other* since the b value only makes up 40% of the var1 column. While probably not a great idea for this data set, this change shows how StatCrunch can create a catch all category (Other*) by combining all categories with an associated percent of total below a specified threshold. The Other* category is also always displayed last in the ordering.

Always Learning
Pearson