Context
Let’s say we are interested in predicting the gender of a candidate for the
British General Elections in 1992 by using the Political Parties as a predictor.
We have the next data:
library(dplyr)
library(tidyr)
elections <- tibble(
party = c("Tories", "Labour", "LibDem", "Green", "Other"),
women = c(57,126,136,60,135),
men = c(577,508,496,192,546)
)
elections
## # A tibble: 5 × 3
## party women men
## <chr> <dbl> <dbl>
## 1 Tories 57 577
## 2 Labour 126 508
## 3 LibDem 136 496
## 4 Green 60 192
## 5 Other 135 546
Being the dependent variable a categorical one, we need to propose a Logistic Model.
Let \(...
[Read more...]