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.

Conducting a descriptive weighted analysis

Conducting a descriptive weighted analysis - R Tutorial

From the course: Descriptive Healthcare Analytics in R

Start my 1-month free trial

Conducting a descriptive weighted analysis

- [Teacher] It's Chapter 6, Section 2, where I give you a quick and dirty example of conducting a weighted analysis. In this section, I'll show some R code I made that's not part of our official series of code, or R-movie, as I keep calling it. It's just a quick and dirty example, like I said. I'll show you how to keep the weight variables when we read in the data, and then I'll show you the code that lets you enter the weighting variable into the descriptive analysis. Then we will look at the output and interpret it. Here's my example for you. I'm going to show you how to calculate state-based rates of asthma. Remember, in order to do this, we can't remove any rows. So you won't see any subset command. Also, remember that if there is any subpopulation that's big in the state that has a high rate of asthma, that will blow up the overall state rate when we use the weights. That's the purpose of using them. So now, join me as we dip our toes into the waters of using the BRFSS weights…

Contents