Presentation is loading. Please wait.

Presentation is loading. Please wait.

Categorical Data By Farrokh Alemi, Ph.D.

Similar presentations


Presentation on theme: "Categorical Data By Farrokh Alemi, Ph.D."— Presentation transcript:

1 Categorical Data By Farrokh Alemi, Ph.D.
This lecture is organized by Dr. Alemi and narrated by Yara Alemi. The lecture is based on the OpenIntro Statistics book.

2 Count of Categories Nominal, ordinal and categorical variables can be analyzed by counting the frequency of occurrence of each category.

3 Frequency Table A frequency table counts the number of observations that fall within different categories of the variable. Here we have classified the severity of the comorbidities of the patient. We count how many patients fall within each category. For example, of the 3921 heart failure patients examined 545 had low severity of comorbidities.

4 Frequency Table A bar plot is a common way to display a frequency table for a single categorical variable. The categories are given on the x-axis and the frequency is given in the Y-axis.

5 Relative Frequency Table
A relative frequency replaces the count of categories with the portion that fall within the category. This figure shows the relative frequency of severity of discharge comorbidities. The bar plot looks the same but the Y-axis has been changed with portion of the sample replacing counts of patients.

6 Contingency Table A table that counts the co-occurrences of two categorical data is called a contingency table. Here we have counted the number of patients with low. Medium and severe conditions at discharge that are readmitted to the hospital within 30 days.

7 Number with severe comorbidity & readmitted
Contingency Table For example, 149 patients had both severe comorbidities at discharge and were readmitted to the hospital within 30 days. Number with severe comorbidity & readmitted

8 Row Proportions Row proportions can be calculated by dividing the value of the cell in the table by the row total. 149 / 367

9 Row Proportions This shows a contingency table with the count of patients in the table replaced with row proportions.

10 Row Proportions In this table, the total row is always one.

11 Row Proportions Now we can more easily see that among patients readmitted in 30 days 41 percent had severe comorbidities at discharge.

12 Column Proportions One can calculate column proportions by dividing each cell in the table by its column total count.

13 Column Proportions This yields 1 for the total row in each column. This is to say that 100% of the patients fall in the column total. By dividing by the total we are examining the portion of the patients that fall within different categories among the total patients falling in the column.

14 Column Proportions Now we can see that among patients with severe comorbidities, 27% are readmitted within 30 days. This provides evidence that knowledge of severity of comorbidities could help us predict which patient might be readmitted.

15 Take Home Lesson Categorical variables are examined by counting the portion that fall within them

16 Do One: Using the following data, (1) create bar plots of frequencies, (2) calculate the row and column proportions, (3) find the portion of patients with no comorbidities who were readmitted See if you can answer these questions. Pay attention to the last part of the question. To answer this part, do you need row or column proportions?


Download ppt "Categorical Data By Farrokh Alemi, Ph.D."

Similar presentations


Ads by Google