A brief outline of getting started is shown below. See the Lab 01 Instructions for more details about the steps.
Here are some tips as you complete HW 04:
Fill in the packages you need to complete the assignment in your R Markdown document.
library(tidyverse)
library(knitr)
library(broom)
library(nnet)
# Include other libraries as needed
For this assignment, we will analyze data from the eye witness identification experiment in Carlson and Carlson (2014). In this experiment, participants were asked to watch a video of a mock crime (from the first person perspective), spend a few minutes completing a random task, and then identify the perpetrator of the mock crime from a line up shown on the screen. Every lineup in this analysis included the true perpetrator from the video. After viewing the line-up , each participant could make one of the following decisions (id
):
The main objective of the analysis is to understand how different conditions of the mock crime and suspect lineup affect the decision made by the participant. We will consider the following conditions to describe the decisions:
lineup
: How potential suspects are shown to the participants
weapon
: Whether or not a weapon was present in the video of the mock crime.feature
: Whether or not the perpetrator had a distinctive marking on his face. In this experiment, the distinctive feature was a large “N” sticker on one cheek. (The letter “N” was chosen to represent the first author’s alma mater - University of Nebraska.)The data may be found in eyewitness.csv
in the data
folder.
Complete the exploratory data analysis by creating the plots and/or summary statistics to examine the relationship between the response variable (id
) and each of the explanatory variables (lineup
, weapon
, and feature
).
Using the plots/tables from Question 1:
id
? Briefly explain.Briefly explain why you should use a multinomial logistic regression model to predict id
using lineup
, weapon
and feature
.
Fit the multinomial logistic model that only includes main effects. Display the model output.
lineup
for each part of the model in terms of the odds.You want to consider all possible interaction effects for the model. Use the appropriate test to determine if there is at least one significant interaction effect.
Regardless of your answer to Question 5, use the model that includes the interaction terms for the remainder of the assignment.
According to the model,
The plots of the residuals versus the predicted probabilities, and the average residuals across categories of each predictor variable are shown below.
Use these plots and tables along with other relevant information to assess the assumptions for the model. Are the assumptions satisifed? Include an assessment about each assumption and a brief explanation about your conclusion.
## # A tibble: 2 x 4
## lineup correct.avg foil.avg reject.avg
## <chr> <dbl> <dbl> <dbl>
## 1 Sequential 5 -0.0000000518 -7.27e-9 0.0000000591
## 2 Simultaneous 0.000000118 -5.38e-8 -0.0000000641
## # A tibble: 2 x 4
## weapon correct.avg foil.avg reject.avg
## <chr> <dbl> <dbl> <dbl>
## 1 no 0.000000111 -0.0000000722 -0.0000000384
## 2 yes -0.0000000451 0.0000000114 0.0000000338
## # A tibble: 2 x 4
## feature correct.avg foil.avg reject.avg
## <chr> <dbl> <dbl> <dbl>
## 1 no 0.0000000555 -0.0000000410 -0.0000000146
## 2 yes 0.00000000916 -0.0000000195 0.0000000104
Use the model to predict the decision made by each participant. Make a table of the predicted vs.the actual decisions.
Once your work is finalized in your GitHub repo, you will submit it to Gradescope. Your assignment must be submitted on Gradescope by the deadline to be considered on time.
See Submitting the Assignment for more details on how to submit the assignment on Gradescope.
Total | 50 |
---|---|
Questions 1 - 8 | 45 |
Document neatly organized with clear headers | 3 |
At least 3 informative commit messages | 2 |