Coding


See below for resources associated with the coding workshops from SIPPS 2023. For materials from other years and/or workshop series, follow this link.


Week 1: Setting up your R environment


Before the workshop:

Before the workshop, please install R and RStudio on your computer. We have compiled this assortment of videos (not made by SIPPS instructors) that go over how to install these programs in Mac & PC, as well as introduce you to the RStudio environment.

Installation:

Intro to RStudio:


During the workshop:

Create create a folder named 01_setup on your computer and download these files within that folder:


After the workshop:

Review these slides from the workshop. (We covered through slide 38, but feel free to review beyond that.)

Note that for this workshop, we only expect that you: (1) have successfully downloaded R & RStudio, (2) have some basic understanding of the different panels/panes of RStudio, how to open files, etc., and (3) know how to install and load packages (including tidyverse, car, psych, and lme4). We will get into the details of how to start actually writing R code next week.


Week 2: Programming fundamentals


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download this file for the synchronous workshop session & place it in the same 02_intro-programming folder.

After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)


Week 3: Data cleaning


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 03_data-cleaning folder.


After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)


Week 4: No workshop session!


No workshop this week due to the Fourth of July.




Week 5: Data manipulation


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 05_data-manipulation folder.


After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)




Week 6: Correlations & basic visuals


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 06_corr-viz folder.


After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)




Week 7: Introduction to linear regression


Before the workshop:

Watch the following two pre-workshop videos, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 07_intro-reg folder.


After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)




Week 8: Interactions in linear models


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 08_reg-interactions folder.


After the workshop:

Review the answer key for challenge completed during the workshop. (We strongly recommend trying to work out answers yourself and/or talk to the instructor before consulting this answer key.)




Week 9: Visualizing effects in linear models


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 09_reg-plotting folder.




Week 10: Advanced plotting


Before the workshop:

Watch the pre-workshop video, and review the accompanying materials:


During the workshop:

Download the following files for the synchronous workshop session and place them in the same 10_adv-plotting folder.