Background Story: One day, my boss asked me to run a Logistic Regression model aval= dlevel+d2 and plot the result. After reviewing the output, she generated a modification part for a new data set that will reflect the d2 variable in the model and asked me to try again.

Without Modification
It is standard that we use GGplot to model logistic regression with one predicting variable(y= x). We can add factor groups for geom points to show the different responses, but GGplot won’t intake two different variables (y=x1 + x2). In this case, We need to construct a new data frame that contains the new predicted value from the desired model.