How can qualitative predictors be incorporated in linear regression?

The most common approach to deal with categorical or qualitative predictors is to use dummy encoding to account for their different levels. If a predictor has k categories, k-1 dummy variables are needed to represent that attribute in the model. For example, if a categorical predictor takes on three possible values (low, medium, high), an appropriate specification would be to create one indicator variable that takes on a value of 1 if the original value is medium and 0 otherwise, and another that takes on 1 if it is high and 0 otherwise. There is no need to create a third indicator for low, since that level is already represented when both medium and high are set to 0. If there is a natural ordering to the levels of a categorical variable, such as in the case of low, medium, and high, it might make sense to map its values to 1, 2, and 3, respectively, but if there is no intrinsic order, or the categories are not equally spaced apart, this would not be a viable approach.