From the course: Descriptive Healthcare Analytics in R
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Adding categorical bivariate tests to Table 1 - R Tutorial
From the course: Descriptive Healthcare Analytics in R
Adding categorical bivariate tests to Table 1
- [Instructor] Welcome to Chapter 6, Section 4. We are now ready to add Categorical Bivariate Tests to our Categorical Table 1. In this section, I'm first going to load up the MASS package, which does some great things for us. It makes it so you can do a Chi-square and Fisher's exact test, which are Categorical Descriptive Analyses. Then again, I'm going to call up the gtools package and make a macro to automate doing all the test we need in Categorical Table 1. We'll update our Table 1 and take a look at what we find. First, let's start with the Categorical Table. We don't have any variables for the first line, so we will just say NA there. But next, we have Alcohol status. You'll see I merged these cells together. We will only have one p-value for this. Now let's go to R and get that p-value. Alright, we are working with our analytic file so we will skip this read code. And surprise, a new package. The package is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Three truths about using weights4m 58s
-
(Locked)
Conducting a descriptive weighted analysis7m 50s
-
(Locked)
Why conduct bivariate tests?5m 8s
-
(Locked)
Adding categorical bivariate tests to Table 17m 17s
-
(Locked)
Introduction to ANOVA and linear regression code2m 43s
-
(Locked)
Adding continuous bivariate tests to Table 17m 25s
-
(Locked)
Challenge: Do a weighted analysis5m 59s
-
(Locked)
Solution: Do a weighted analysis4m 57s
-
(Locked)
-