Problem Set 3

Important

Due September 27 at 11:l59 pm on Canvas

Problem Set 3 is posted on Canvas. You must use the provided RMarkdown file to complete this problem set.

If you have any issues using RMarkdown please see me in my office so we can make sure you can knit the file on your computer.

Files

  1. Problem Set - PDF
  2. RMardown file

Purpose

This third problem set will help you practice:

  1. Setting the working directory
  2. Loading data into R
  3. Computing and interpreting the mean of a variable for different subsets of a sample
  4. Estimating the average treatment effect for a randomized experiment

You will use the following commands:

# From the previous problem sets
setwd()

read.csv()

mean()

# New in this problem set

# Subsetting data; for example:
data$var1[data$var2==1]

Criteria for success

In addition to providing the correct code and/or answer, a successful problem set will:

  1. Have clear explanations that demonstrate your knowledge of the material
  2. Use the “comment out” function to explain what the code is doing