Week 10 Exercises - Multiple Regressions

Follow Along

Download Week 10 Class ActivityFollow Along (.csv)

Data is taken from Cards Against Humanity - Pulse of the Nation

Download the data and move it to the correct folder so that you can access it in this activity.

Import the data into your R file.

Focus on having reproducible code! You will share your file with someone else. They should be able to run it.

Steps:

  1. Import Data
  2. Check descriptive statistics
  3. Create a correlation plot for the continuous variables
  4. Visualize the relationship between # of Transformers Movies and Books
  5. Conduct a multiple linear regression predict # of Transformers Movies.
  6. Briefly report the results

Items in the Data:

Var Name Info
id Study ID
Income Overall income
Sex Sex
Age Age
Age Range Age given in ranges
Political Affiliation Political Affiliation
Education What is your highest level of education? 
ethnicity What is your race?
marrital status What is your marital status?
climate change Do you believe that climate change is real and caused by people, real but not caused by people, or not real at all?
Transformers How many Transformers movies have you seen? 
books How many books, if any, have you read in the past year?
ghosts Do you believe in ghosts?
spending Is federal funding of scientific research too high, too low, or about right?
choice If you had to choose: would you rather be smart and sad, or dumb and happy?
shower_pee Do you think it is acceptable or unacceptable to urinate in the shower?

On Your Own

Objective: To examine the process of multiple linear regression. To produce a reproducible workflow.

Download Week 10 Class Activity - On Your Own (.csv)

Data is taken from Kaggle

Download the data and move it to the correct folder so that you can access it in this activity.

Import the data into your R file.

Focus on having reproducible code! You will share your file with someone else. They should be able to run it.

You will be saving this to a thumb drive to share with someone else in the class. Please put everything in one folder that can be shared with a classmate.

Steps:

  1. Import Data
  2. Identify your Outcome Variable and up to 3 predictor variables. Why did you choose your predictors?
  3. Visualize the relationship between 2 variables (with one being your Outcome)
  4. Conduct a multiple linear regression to predict your outcome variable (3 predictors maximum)
  5. Use check_model to examine the model
  6. Briefly report the results

When you get your shared files:

  1. Save a Word doc in there that answers the following questions:
    1. Your Name:
    2. Name of person who’s data/script you have:
    3. Were you able to run their code without modification?
    4. If you did have to modify things, what did you have to do?
    5. On a scale from 1 - 10 (10 being “excellent”), how would you rate the code that you received?