If we want to explore tenure a bit further for the churners, we could also produce a matrix plot showing the association between tenure and any other variables we choose. In this example we will use the ggpairs() function to plot the matrix plots for tenure, gender, satisfaction, and monthly charges:
str(xchurn)install.packages("GGally")library(GGally)library(ggplot2)ggpairs(xchurn,c(3,4,7,8),lower=list(combo=wrap("facethist",binwidth=30)))
We can see from the plot that males churn quicker than females. This is indicated by the matrix plot in the first row and third column. Note that a boxplot is produced since a continuous variable (tenure) is being compared with a categorical variable (gender). The matrix plot is ...