Week 3
Bayes’ Rule & EDA
Overview of Week 3
Day 4
- Bayes’ Rule (Fall 2023: Day 5)
- Section 2.2.5
- R Packages (Fall 2023: Day 2)
Day 5
Fall 2023: Day 3
- Data visualization, exploratory data analysis (EDA), and summarizing categorical data
- Sections 1.5-1.7 & supplementary material
- Below I posted additional “Day 3 part 3” slides with extra data wrangling code. I refer to some of the slides in the homework assignment. You are welcome to go through all of the slides to learn some data wrangling techniques. We will be covering topics from these slides as needed throughout the quarter.
- Bonus:
- Examples on dealing with overlapping labels in figures (Slides 65, 66, & 68 from BERD R intro workshop)
- Check out Ted Laderas’s Better Plots presentation
Note
As I mentioned in the recording, the various options in more complex figures I usually look up how to implement when I need them. I show them so that you are aware of some of the functionality and options one has in creating figures using the ggplot2 package. At the end of the slides, we cover how to create tables summarizing data, especially categorical data. This part has some very useful code and data wrangling in it.
Slides & Recordings
- Pre-recorded lessons are on Echo Cloud (aka echo 360 or echo video).
Day | Topic | Slides (F23): html | Slides: pdf | Slides: web-page | Slides with notes | Recording Link (F23) | Duration | Code: qmd | Code: html |
---|---|---|---|---|---|---|---|---|---|
4 | Bayes’ Rule (Book section 2.2.5) | Day 5: slides 1-2 | Day 5 Part 1 | 22 min | |||||
Bayes’ Rule (Book section 2.2.5) | Day 5: slides 3-6 | Day 5 Part 2 | 22 min | ||||||
R packages | Day 2: slides 47-54 | Day 2 Part 4 | 30 min | ||||||
5 | Exploratory Data Analysis | Day 3: slides 1-59 | Day 3 | 1 hr 18 min | |||||
Extra EDA slides | Day 3 Part 2 slides | ||||||||
Day 3 Part 3: Extra data wrangling code |
Class discussion
During class you will be working in groups discussing the following:
Day04
- R Packages (Fall 2023: Day 2)
- R packages: any difficulty installing packages?
- Bayes’ Rule (Fall 2023: Day 5)
- Example 2.10 on pg 6 of slides
- From HW 2
- Book exercises
- 2.24
- Non-book exercise
- Book exercises
Day05
- Can distribution shape and sample size be determined from a boxplot? (see slide 30)
- Is there evidence of ethnicity (Hispanic vs. White non-Hispanic) discrimination in DDS expenditures? Why or why not?
- See Slides table above for Day 3 Part 2 slide deck (and code) that I presented in class
- From HW 2
- R1 & R2: NHANES - parts 1 & 2
Homework
- HW 2 due on Sat, 10/19
- See extra Day 3 Part 3 slides (both pdf and code) in table above with slides & recording links.