课程: Descriptive Healthcare Analytics in R

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Adding categorical bivariate tests to Table 1

Adding categorical bivariate tests to Table 1 - R教程

课程: 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…

内容