By comparing the sizes of the rectangles corresponding to values Bachelors, Doctorate, Masters, and Some-college on the sex vs. education mosaic plot we can see that the fraction of men that have finished college is larger than the fraction of women that have finished college.
We can further subdivide the rectangles according the co-occurrence frequencies with a third categorical variable. We are going to choose that third variable to be income, the values of which can be seen as outcomes or consequents of the values of the first two variables of the mosaic plot.
From the mosaic plot “sex vs. education vs. income” we can make the following observations.1. Approximately 75% of the males with doctorate degrees or with a professional school degree earn more than $50000 per year.2. Approximately 60% of the females with a doctorate degree earn more than $50000 per year.3. Approximately 45% of the females with a professional school degree earn more than $50000.4. Across all education type females are (much) less likely to earn more than $50000 per year.
I updated the implementation of the function MosaicPlot to have an interactive feature using Tooltip that gives a table with the exact co-occurrence (contingency) values when hovering with the mouse over the rectangles.
The functionality that took me most effort and designing to do was the coloring of the rectangles. I chose
an approach that makes the plots easier to read. Here is a grid of examples: