library(tidyverse)
library(broom)
library(fivethirtyeight)
We will be using the candy_rankings
dataset from the fivethirtyeight
package.
glimpse(candy_rankings)
#> Observations: 85
#> Variables: 13
#> $ competitorname <chr> "100 Grand", "3 Musketeers", "One dime", "One q…
#> $ chocolate <lgl> TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, FA…
#> $ fruity <lgl> FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE,…
#> $ caramel <lgl> TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, …
#> $ peanutyalmondy <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, …
#> $ nougat <lgl> FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, …
#> $ crispedricewafer <lgl> TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,…
#> $ hard <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE…
#> $ bar <lgl> TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, FA…
#> $ pluribus <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE…
#> $ sugarpercent <dbl> 0.732, 0.604, 0.011, 0.011, 0.906, 0.465, 0.604…
#> $ pricepercent <dbl> 0.860, 0.511, 0.116, 0.511, 0.511, 0.767, 0.767…
#> $ winpercent <dbl> 66.97173, 67.60294, 32.26109, 46.11650, 52.3414…
What variables and interactions did you choose?
Perform backwards selection, making sure to show each step of the
process.
Provide interpretations for the slopes of your final model.