Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R coding In class, we created a mosaic plot of smoking status for each level of exercise in the `survey` dataset in the `MASS` package.

R coding

In class, we created a mosaic plot of smoking status for each level of exercise in the `survey` dataset in the `MASS` package. The bars and the categories for each bar were not in logical order, but rather alphabetical order. Recreate the mosaic plot putting the levels of smoking status and exercise in a logical order. In order to do this, re-code the values of the variables with numbers and then make the mosaic plot again with the re-coded variables. You can leave the mosaic plot labeled with numbers, but explain in text below your plot what the number codings represent.

First, we will remove row 70 of the dataset since that observation has a missing value for smoking status:

```{r} library(MASS) surveydata = survey[-70,]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

Distinguish between serial payments and annuity payments.

Answered: 1 week ago

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago