Home (Fall 2018 Backup)

Welcome to the course page for EPID 799C: R for Epidemiologists at UNC Chapel Hill!

The fall 2018 class will be held M/W 10:10-11:25am in Rosenau 228.

Note that if you’re signing up for the fall 2018 class, previously full at 20, the class size has been expanded to 22 and a waitlist is added – we historically have a few drops, so do try the wait list if you’re interested. Contact the instructors if you are interested in the material but having trouble registering. If you are looking for past year’s courses, see here: 2017 Fall.

How to get ready for the class:

  1. Fill out the class 2018 Roster and join the google group to get class messages.
  2. Download the Fall 2018 Syllabus and NC births data* for homework.
  3. Download and install R and RStudio (instructions here if you need them).
  4. See the Resources page for information about Datacamp invites.

If you joined the class late: welcome! We suggest you review (and work through in R!) the previous slides, download and load the data, and review the past messages in the google group to get you up to speed.

* License and data information: Please note that the NC Birth Data has recently moved to publicly available *upon request* from being publicly available and hosted online. We have hosted the dataset here with permission from the North Carolina State Center for Health Statistics (NC SCHS) for the class and associated workshop purposes. Uses outside of those should contact SCHS and request the data using the F-14 data request form. The slides, recordings, and other class materials are offered under the GNU Public Licenses (GPL), though we request group uses “at a distance” (e.g. not in class or workshops) contact the instructor staff for permission. Individuals using class material for self-training are encouraged to reach out to the instructor staff to say hello!
Week L# Lecture Homework Optional
W 8/22 1 Introduction to the Course and RStudio
(scripts, recording) (Mike)
In Class: Fill out Roster. Join google group. Install R & RStudio (instructions). Writing Code in RStudio – First of a great series of free recorded webinars.
M 8/27 2 Programming with R I: Types, structures, subsetting
(script, recording) (Mike)
Adv-R: Intro.
Project-oriented workflow: not covered (much) in class, but something to consider.
W 8/29 3 Programming with R II: factors, dates, control, functions
(recording, script) (Mike)
R for Data Science Ch 15 & 16: Factors and Dates.
M 9/3 Labor Day – No Class Article: The future of R.
W 9/5 4 Epi Review & Recoding I
(recording) (Nick)
HW introduced
(see slides)
Adv-R: Ch 1-3. Packages: desctable
M 9/10 5 Recoding II: Numerical & Graphical Descriptives
Adv-R: Foundations (stop at functions)
W 9/12 Class Cancelled – Slides Posted for 9/19 Webinar: dplyr/ggplot2/purr 11am EST. Base R Graphics demo. Datacamp graphics intro.
M 9/17 Class Cancelled – Slides Posted for 9/19 Due*: HW1
(*Due date extended b/c of Hurricane Florence. Email it to Mike when you can.)
(answers.R, answers.Rmd)
Read Jenny Bryan’s (excellent) purrr tutorial. Suggest lessons 1-4.
W 9/19 6 Recoding III: Preparing for apply (Sara)

Apply, lists, and deep R foundations (Mike)
(recording, whiteboard)

Adv-R: Functional Programming 1-3
Webinar: Hadley or Jenny on list-columns. (These webinars are high level and take multiple listenings, but *highly* recommended.
M 9/24 7 Apply 2, purrr (recording) (Mike) Datacamp intro to ggplot2. Highly recommend: RStudio tidyverse webinar.
W 9/26 8 Data Manipulation w/ dplyr (no recording) (Sara)
M 10/1 9 Graphics: ggplot 1 (voice recording) (Nick) Due: HW2
W 10/3 10 Graphics: ggplot 2 (Nick) Neat Equisse package for ggplot gui development.
M 10/8 11 GLMs I
(script, recording) (Mike)
W 10/10 12 GLMs II
(script, recording) (Mike)
M 10/15 13 Confounding & DAGs in R
(script, recording) (Mike)
Due: HW3
(recode tbl, county tiers, answers)
W 10/17 14 Effect Measure Modification
(recording) (Mike)
On race-ethnicity: (1) What Makes Someone Native American?
M 10/22 15 Outputs and Reports
(script, recording) (Mike & Nick)
W 10/24 16 R Markdown
(markdown, rmarkdown, recording) (Nick)
M 10/29 17 Maps 1
(script & env, recording)  (Mike)
Due: HW4
W 10/31 18 Maps 2 (recording)
M 11/5 19 Special Topics – String Manipulations, Web-scraping, Multilevel Modeling & Population Genetics (data, rmd) (Nick)
W 11/7 20 Special Topics – Predictive Modeling & Machine Learning
(script, recording error!)
M 11/12 21 Special Topics – Inverse Probability Weights (R markdown code and html, recording) (Sara) Due: HW5
(answers, received HW matrix)
W 11/14 22 Special Topics – Survival Analysis
(R markdown code and html, recording) (Sara)
M 11/19 23 Special Topics – Sankey visualizations (recording) (Sara)


Course Project Q&A

W 11/21 No Class Thanksgiving Break
M 11/26 24 Special Topics – Shiny & Web Data Viz (recordingshiny app zip)
W 11/28 Presentations Due: Project Slides. See 2017 projects for ideas. Presenting: Hillary Topazian, Molly Deutsch-Feldman, Christine Hsu, Kelsey Sumner, Deanna Caruso, Griffin Bell, Cedar Mitchell, Sequoia Leuba


M 12/3 Presentations Presenting: Sinead Isaacson, Rachael Ross, Samuel Goldstein, Bethany DiPrete, Sunhwa Park, Tian Wang, Nidia Rodriguez, Oumar Diallo, Dazhe Chen, Heather Henderson, Amber Hall, Ryan Max


W 12/5 25 Wrap-up