Frequencies
Menu location: Analysis_Frequencies.
This function gives the actual and relative values for frequency and cumulative frequency of observations in the samples you select. You can choose to have the results sorted by value or by frequency, in ascending or descending order; the cumulative frequencies run down the table in the order that you choose.
Values that are numbers are put in order of size; values that are not numbers come after them, in the order of their characters (capital letters before small letters). If you sort by frequency then values that have the same frequency are put in the order of their values.
An empty cell is counted as a missing value, down to the last row of your selection that contains data. Missing values are counted in the total, which is followed by the number of them, and are shown in the first row of the table; the relative and cumulative percentages are of the values that are not missing.
Example
The following represent responses to an element of a questionnaire that used a Likert scale:
3
3
4
1
1
2
5
3
In order to analyse these data in StatsDirect, first enter them into a workbook column. Then select this column and choose the frequencies option of the analysis menu.
For this example:
Frequency analysis for Response
Total = 8
| Value | Frequency | Relative % | Cumulative | Cumulative Relative % |
| 1 | 2 | 25 | 2 | 25 |
| 2 | 1 | 12.5 | 3 | 37.5 |
| 3 | 3 | 37.5 | 6 | 75 |
| 4 | 1 | 12.5 | 7 | 87.5 |
| 5 | 1 | 12.5 | 8 | 100 |
R code
This R code reproduces the example above. It needs no packages and was checked with R 4.6.1. Paste it into R, or save it as a script and run it.
# Frequencies: the StatsDirect help example (eight responses on a Likert scale)
# in R
response <- c(3, 3, 4, 1, 1, 2, 5, 3)
n <- length(response)
# R's standard table of counts
counts <- table(response)
print(counts)
# The report's table: each value with its frequency, relative frequency as a
# percentage, cumulative frequency and cumulative percentage
cat("Total =", n, "\n")
cat("Value Frequency Relative % Cumulative Cumulative Relative %\n")
cumulative <- cumsum(counts)
for (i in seq_along(counts)) {
cat(names(counts)[i], counts[i], 100 * counts[i] / n, cumulative[i],
100 * cumulative[i] / n, "\n")
}