From the course: Descriptive Healthcare Analytics in R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding overall frequencies to categorical Table 1

Adding overall frequencies to categorical Table 1 - R Tutorial

From the course: Descriptive Healthcare Analytics in R

Start my 1-month free trial

Adding overall frequencies to categorical Table 1

- [Instructor] Welcome to Chapter 5, Section 3 where we start filling in our Table 1s. So, both Table 1s, the categorical format and the continuous format, call for overall frequencies in each stratum. For example, stratifying by sex, male and female, and stratifying by Hispanic status. So what we do in this section is these univariate calculations, because there is only one variable being used at a time. We have to put this info in both Table 1s, but I'll start by demonstrating doing asthma and alcohol frequencies and putting them in categorical Table 1. Ready to start filling in the tables? Let's go to our R code. Okay, we'll ignore this read code at the top because we already have our analytic data set in memory, and we will get right to the analysis. This is where your data dictionary is so helpful. Let's start with asthma. See the code? We make a frequency table named AsthmaFreq. Then, I listed it here so we could see it. If we make a table out of it, it doesn't display unless…

Contents