Logistic regression
Although logistic regression was partly covered in Chapter 6, Beyond the Linear Trend Line (authored by Renata Nemeth and Gergely Toth), as it's often used to solve classification problems we will revisit this topic again with some related examples and some notes on—for example—the multinomial version of logistic regression, which was not introduced in the previous chapters.
Our data often does not meet the requirements of the discriminant analysis. In such cases, using logistic, logit, or probit regression can be a reasonable choice, as these methods are not sensitive to non-normal distribution and unequal variances within each group; on the other hand, they require much larger sample sizes. For small sample sizes, discriminant analysis is much more reliable.
As a rule of thumb, you should have at least 50 observations for each independent variable, which means that, if we want to build a logistic regression model for the mtcars
dataset as earlier,...