In this exercise you will learn to visualize the pairwise relationships between a set of quantitative variables. To this end, you will make your own note of 8.5 Mosaic plots from Data Visualization with R.
Mosaic charts can display the relationship between categorical variables using:
The Titanic data set came from https://osf.io/aupb4/.
In the graph below,
More people died than survived, as shown in the table.
Males in the 3rd class was the largest group that didnt survive
Females in the first class is the largest group that survived.
Males in the 3rd class. They had more of a chance of dying then the males in 1st class or 2cnd class
Hint: The Arthritis data set is from the vcd package. Add an additional argument gp = shading_max in the mosaic function. This is because the residuals are too small to have color.
1.no 2. patients that didnt recieve treatments 3.the treated patients that showed market improvement 4. more cases than by chance 5. fewer cases because they didnt receive treatment
Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.