12  LAB II: Descriptive Statistics

When we have finished this Lab, we should be able to:

Learning objectives
  • Summarize a categorical variables.
  • Display a categorical variable with a simple plot.
  • Summarize numerical variables.
  • Dispaly numerical variables with histograms and box plots.

 

In this Lab, we will use the data from arrhythmia dataset that we have already downloaded in our PC. (Note: This starts by assuming we know how to get data into Jamovi).

12.1 Summarizing Categorical Data (Frequency Statistics for one categorical variable)

Consider the binary sex variable in arrhythmia dataset. A simple way for summarizing the data is to create a table that shows the number of times each category has been observed.

Firstly, we add labels to numerically coded values of sex variable (see Chapter 11) (0 = male, 1 = female).

On the Jamovi top menu navigate to

flowchart LR
  A(Analyses) -.-> B(Exploration) -.-> C(Descriptives)

as shown below in ?fig-descriptives1.

In the menu at the top, choose Analyses > Exploration > Descriptives.

The Descriptives dialogue box opens, as shown below Figure 12.1:

Figure 12.1: The Descriptives dialogue box.

Transfer the sex variable from the left-hand pane into the Variables pane by highlighting the variable and pressing the Arrow Button (). Alternatively, drag and drop the variable. Next, we tick the “Frequency tables” box and we also uncheck all the other options of descriptive statistics. We will end up with the following screen (Figure 12.2):

Figure 12.2: Drag and drop the sex variable to Variables pane

The output should look like the following:

Figure 12.3: Frequency distribution table of sex

The percentage of female patients (55%, 249/452) is larger than the percentage of male patients (45%, 203/452) in our data.

To generate a basic descriptive plot navigate to the Plots section and check the Bar Plot, as shown below (Figure 12.4):

Figure 12.4: From the Plots section check the Bar plot

The bar plot produced here presents the absolute frequencies (counts) (Figure 12.5).

Figure 12.5: The bar plot produced by Jamovi for the binary variable sex

More descriptive plots are available for all data types using the surveymv and JJStatsPlot modules.

12.2 Summarizing Numerical Data

From the top menu navigate to:

flowchart LR
  A(Analyses) -.-> B(Exploration) -.-> C(Descriptives)

as shown in ?fig-descriptives1.

Now, drag and drop the variables age and QRS into the empty Variables box, as shown below (Figure 12.6):

Figure 12.6: Drag and drop the age and QRS to Variables pane.

Next, we decide how to display our data tables. We have got the following two options:

  • Variables across columns

  • Variables across rows

Let’ select variable across columns (the default).

We can now select the relevant descriptive statistics in the Statistics section:

Figure 12.7: Select the descriptive statistics of interest.

Once we have selected our descriptive statistics, a table will appear in the output window on our right, as shown below (Figure 12.8):

Figure 12.8: Descriptive statistics for variables age and QRS

For continuous data we can select Histograms, Box Plots, Violin and Data as shown below:

Figure 12.9: From the Plots section select Histograms, Box Plots, and Violin plots.

Figure 12.10: Histograms of age

Figure 12.11: Violin plot of age

Age is a symmetrical distribution.

Figure 12.12: Histograms of QRS

Figure 12.13: Violin plot of QRS

QRS is an asymmetrical distribution (the data are skewed to the right).