March 2019
Beginner to intermediate
464 pages
10h 57m
English
The last exercise that we are going to do in this chapter involves combining continuous and categorical variables for our regression analysis. Let's first factorize the two categorical variables, Gender and Education, that we discussed in the previous section, and store them in a DataFrame by using the following code:
continuousDF$Gender <- factor(df$Gender)continuousDF$Education <- factor(df$Education)
The DataFrame, continuousDF, now contains the following columns:

Now, we are going to fit a logistic regression model with both the categorical and continuous variables, using the following code: ...
Read now
Unlock full access