1. Learn
  2. /
  3. Courses
  4. /
  5. Causal Inference with R - Experiments

Exercise

Oregon Health Experiment Data: Data Structures

Let's say you're wondering how much mens' and womens' health differed in the experiment, and what the data says about Medicaid's effects on those differences, so you decide to look at some of the basic health numbers in the data. A simulated version of the Oregon Health Insurance Experiment data, OHIE, is available in the workspace. With this dataframe, we will make some quick calculations to learn about any differences. Our first step will be to separate out the treatment and control groups into new dataframes.

Instructions

100 XP
  • 1) Use the str function to examine the structure of the OHIE dataframe.
  • 2) Create a dataframe called TreatmentGroup that only contains respondents that were selected into the OHIE treatment group (`OHIE$treatment==1).
  • 3) Create a dataframe called ControlGroup that only contains respondents that were not selected into the OHIE treatment group (`OHIE$treatment==0).