7 Tabulating Categorical and Numerical Data

You can tabulate categorical or numerical variables in Rguroo and create frequency or relative frequency tables. You would use the Tabulation function in the Analytics toolbox to do so. To tabulate numerical data, you can use one of Freedman-Diaconis, Sturges, or Scott algorithms or use various customization options to set the classes (bins).

7.1 Tabulating Categorical Variables

Instructional video icon Instructional video icon

Steps for Tabulating Categorical Variables:

  1. Use a dataset in your Rguroo account or recreate the example below by importing the cardata dataset from the Rguroo dataset repository called Rguroo Users Guide into your account.
Click here to see a portion of the dataset. Screenshot of the first 5 rows of the Cardata dataset.
  1. Open the Analytics toolbox on the left-hand side of the Rguroo window. Click on the Analysis dropdown menu and choose the Tabulation –> Categorical function. The Data Tabulation dialog opens.

  2. Select your dataset from the Dataset dropdown menu. In this example, we select the cardata.

  3. Click the plus icon plus button icon at the top of the first column. Type a name for your table.

  4. Select the qualitative variable that you want to tabulate from the Factor 1 dropdown.

  5. Select one or more of the options Counts, Proportions, or Percentage.

  6. Click the Preview icon preview icon to see the result.

Screenshot of Categorical Summaries dilog.

Figure 7.1: The Tabulation function dialog.

Screenshot of the tabulation output.

Figure 7.2: An example of a tabulation output.

Additional Options for Tabulating Categorical Variables:

-Click the plus icon plus button icon to tabulate additional variables.

  • You can tabulate up to three categorical variables simultaneously using the Factor 1, Factor 2, and Factor 3 dropdowns.

  • You can compute conditional proportions by selecting the Cond checkbox.

  • You can add frequencies (weights) by selecting a frequency variable from the Frequency dropdown.

  • You can use the Level Editor level editor button to reorder the levels of the categorical variables.

  • You can save the tables as an Rguroo dataset by using the Save Dataset option on the top right.

  • For one-way tables, you can order categories (levels) in ascending or descending order of frequencies. By default, categories (levels) are ordered alphabetically based on their names.

7.2 Tabulating (Binning) Numerical Variables

  1. Use a dataset in your Rguroo account or recreate the example below by importing the cardata dataset from the Rguroo dataset repository called Rguroo Users Guide into your account.
Click here to see a portion of the dataset. Screenshot of the first 5 rows of the Cardata dataset.
  1. Open the Analytics toolbox on the left-hand side of the Rguroo window. Click on the Analysis dropdown menu and choose the Tabulation –> Numerical (Binning) function. The Binning dialog opens.

  2. By default, a table name is shown in the Table column. You can overwrite the name with a title for your table.

  3. Select your dataset from the Dataset dropdown menu. In this example, we select the cardata.

  4. From the Variable dropdown, select the numerical Variable for which you like to create a frequency table.

  5. In the Bins section, select a method for binning. For the example shown, the bins start at 90 and have a width of 10.

  6. From the Report section, select one or more options of Counts, Proportions %, or Cumulative %.

  7. Click the Preview icon preview icon to see the result.

Screenshot of Binning dilog.

Figure 7.3: The Binning function dialog.

Screenshot of the binning output.

Figure 7.4: An example of a binning output.

Additional Options for Tabulating Numerical Variables:

  • Click the plus icon plus button icon to tabulate additional variables.

  • You can give a title to your table under the Table column.

  • Click the help icon help button icon to see descriptions of various methods in the Bins section.

  • You can compute mean, standard deviation, and variance based on the tabulated data.

  • On the top row of the Rguroo environment, there are three save options. The Save as ... saves your work as an Rguroo object so you can reproduce it. The Save Detail Dataset adds a column to the raw dataset indicating to what bin (class) each datum is assigned, and the Save Frequency Dataset.