Analysing categorical data

So far we have looked at fitting models with categorical predictor variables, but always predicting a continuous outcome variable. Sometimes, however, we want to predict categorical outcome variables. In other words, we want to predict into which category an entity falls. For example, we might want to predict whether someone is pregnant or not, for which political party a person voted, whether a tumour is benign or malignant, whether a sports team will win, lose or draw. In all of these cases, an entity can fall into only one category, for example a woman can be pregnant or not; she can't be 'a bit pregnant'. The next two chapters deal with statistical models for categorical outcomes. We'll begin with some basic models of associations between categorical variables, then look at predicting categorical outcomes from categorical predictors, then in the next chapter we'll move on to look at predicting categorical outcomes from both categorical and continuous predictor variables.