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
the males in the third class was the largest group that did not survive
females in the 1st class was the largest group that did survive
the males in the third class had more cases than expected, if the males in 3rd class were in first or second they would have had a better chance also if you were a female in the first class you had a better chance of survival.
3rd class males had fewer than expected cases and first class females had less cases than expected.
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.more patience did not improve 2.patience with the placebo had the largest group that didn’t improve 3.the group that was treated showed marked improvement 4.the group that was treated had more improvement than expected 5.the patient group that did not receive treatment showed marked improvement there was fewer cases ## Q8 Hide the messages, the code and its results on the webpage. Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.