---
title: "Homework 1: Sample Characteristics"
author: "YOUR NAME HERE"
date: today
format: 
  pdf: 
    toc: false
execute: 
  warning: false
  message: false
---

# Get the data

```{r}
library(tidyverse)
library(sjPlot)

demog <- read_csv("data/demog.csv")
```

## What variables do we have?

1. Use `glimpse()` to inspect the variables in the `demog` data set. Match these variable names to the codebook, and write 1-2 "human readable" words that describe what this variable is about. The first three have been started for you

```{r}

```

* **consent**: Consent
* **Q1**: Age
* **Q2**: Race/Ethnicity


2. Using the information from `glimpse`, how many rows (observations, people) do we have, and how many columns (variables/characteristics)



3. Not everyone consented to participate in this research. Create a `table()` of the `consent` variable and report how many said "No". 

```{r}

```


4. Even if there is data on the individuals that said "no" they did not consent, it is not ethical to use those data rows. Use the tactics shown in `01-intro_r` under `Conditional subsetting` to make a new data frame called `demog_analysis` that filters the `demog` data set to only keeps rows where `consent != "No"`

```{r}

```

# Sample Characteristics

Answer the following questions on the analysis data set (`demog_analysis`)

1. How old are students in the analysis data set? Your answer should include both numbers and percents. 

```{r}

```

2. What genders are represented? Create a plot then answer this question. 

```{r}

```


3. Describing the racial/ethnic makeup of participants is challenging with the data as collected. Identify and describe why this is the case. Run at least one R command to demonstrate the difficulty. Hint: You will have to read the codebook carefully and think back to examples we saw in class on day 1. 

```{r}

```

4. Pick one other variable to describe. Create a table, a proportion table, and a barplot of this variable. Describe some patterns you see using both N's and %'s in your answer. 

```{r}

```



5. Often we are interested in average gpa for groups of people. Is it possible to calculate the average GPA for students in this data set? Why or why not? You must justify your answer using the results from code or describe some feature about the data in your answer. 

```{r}

```


6. Write one research question that we could try to answer with this data. Identify the specific variables that you would use. 
