---
title: "Chapter 2 Lab"
output:
  word_document: default
author: Insert Your Name Here
---

## Preparation

```{r setup, include=TRUE, message = FALSE, warning = FALSE}
# On first use packages must be installed.
# Example: install.packages("haven") 

# Load packages used in this session of R
library(knitr)
library(car)

opts_chunk$set(echo = TRUE)
options(digits = 3)
  ## As needed, set path to folder where data is located.
  ## For example: opts_knit$set(root.dir ="C:/Data")
```

#### 1) Load the data set *Ch2_Lab_ExitPoll.dta*

```{r tidy = FALSE}
```

#### 2) Create dummy variables for each state/DC.  How many observations are in each state?

```{r tidy = FALSE}
```

#### 3)	Convert the year_born variable into age.  Check for and *correct* data errors.  What is the average age of all observations in the data set?  The minimum and maximum?

```{r}
```

#### 4)	What is the distribution of the gender variable?  Create a male dummy variable and indicate the distribution of this variable. Compare distribution of the male variable to the distribution of the gender variable.

```{r}
```

#### 5)	Provide descriptive stats for Trump and Clinton feeling thermometer.  Is there anything you need to adjust?
```{r}
```

```{r}
```

#### 6) Produce histograms of the Clinton and Trump feeling thermometers

```{r tidy = FALSE}
```

#### 7) Create a scatterplot of the Clinton and Trump feeling thermometers

```{r tidy = FALSE}
```

#### 8)	What is the distribution of the education variable?  Is there any adjustment you would need to make if you will use this as a continuous variable in a regression model?

```{r tidy = FALSE}
```


#### Additional Comments: It may be convenient to save the data, as we'll use this in the lab for next chapter. Here, we save the data as .Rdata format.

```{r tidy = FALSE}
```
