Week 5 Slide Decks
Overview
We will continue our exploration of statistics in R this week from last week’s lab. We’ll expand our conversation to statistical tests that support multiple explanatory variables (i.e., “x variables”) as well as what tools allow those X variables to affect one another and the response variable. We’ll then leave null hypothesis testing behind and move on to a different philosophical approach to hypothesis testing: multi-model inference. In lab we’ll discuss the benefits of feedback in improving one’s work as well as what constitutes “good” feedback. We’ll finish lab with student presentations of the first draft of the function tutorials.
Lecture 5 - Multi-Model Inference
Lab 5 - Survey Design Basics
Homework 5
Learning Objective(s)
Upon completion of this assignment, students will be able to:
- Identify the most appropriate statistical test for a given hypothesis
- Use multi-model inference tools in R
Assignment Due Date(s)
Each homework is due at midnight the day before each lecture (i.e., Monday night) Late work will be accepted but will be subject to the late assignments policy outlined in this course’s syllabus.
Assignment Description
This homework should be submitted as an R Markdown with your last name and the week number as the file name (e.g., “Lyon_week6.Rmd”). Remember to specifically load any necessary packages using the library
function and include comments explaining what line(s) correspond to each of the following prompts.
- You hypothesize that penguin flipper length differs between sexes and that the degree of difference between sexes is related to the species of penguin (i.e., sex and species are interacting). Test your hypothesis using the “penguins” dataset in the
palmerpenguins
package- What is the name of the most appropriate statistical test? Why is it the correct test for this question?
- In a code chunk, fit the model you have chosen and generate a summary table of the relevant information. Remember to remove any penguins that don’t have a recorded sex!
- Based on the summary table you just generated, is your hypothesis supported? What information in the summary table allows you to draw this conclusion?
- You present on your work at a professional society’s annual meeting and people are really excited about this finding! A colleague approaches you afterwards and asks you whether you’ve used multi-model inference to check to see if including the home island of the penguin improves your model’s explanatory power. You realize this is a great idea and decide to pursue it immediately
- Fit a model with sex and species interacting and add a term for island (no interaction term). Fit another model where sex, species, and island are all included as explanatory variables and they are all allowed to interact.
- Using the
AIC
function, compare these two new models with your original model. Which model has the most explanatory power? How do you know?