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,

Q1 Are more passengers survived?

No most passangers died on the titanic, mostly men in all classes.

Q2 Describe the largest group that didn’t survive. Discuss by class and gender.

The largest group that didn’t survive was the large dark blue rectangle as 3rd class males who didn’t survive on the titanic.

Q3 Describe the largest group that did survive. Discuss by class and gender.

The largest group that survived was the dark blue medium size 1st class females.

Q4 Describe one group that has more cases than expected given independence (by chance). Discuss by class and gender.

The group that has more cases would be males in the 3rd class that didn’t survive and females in the first and second class that did survive

Q5 Describe one group that has less cases than expected given independence (by chance). Discuss by class and gender.

The group that has less cases would be males in the 3rd class and second class that survived and females in the first and second class that didnt survive

Q6 Create a mosaic plot for Arthritis in the same way as above.

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.

Q7 Repeat Q1-Q5.

Q1. most people do not have any improvement in their treatments.

Q2. The largest group was the none imrpoved placebo treatment group

Q3.The largest group that has improved was the marked treated group

Q4. The more cases from a certain group would be the treated marked patients with the dark blue.

Q5. The less cases would be the marked placebo patiets with the darker red.

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.

Q9 Display the title and your name correctly at the top of the webpage.

Q10 Use the correct slug.