Acquisitions
July 13, 2020
Tell a story from your life, describing an experience that either demonstrates your character or helped to shape it.
July 13, 2020
Show all

R Homework

The vector `problem.1.data` contains numeric data.

Construct a stipchart of the values in `problem.1.data`. Do you see any evidence of any outliers?

**Solution**

Repair this outlier.

* First, report the location of the outlier.

* Next, convert the value to `NA`.

* Finally, display the value of the vector at this location, and show that it has the value `NA`.

**Solution**

Construct a stripchart of the repaired version of `problem.1.data`. Do you see any indication of a -9 being used to represent a missing value?

**Solution**

It’s not best practice to represent a missing value using the value -9, so we need to repair this.

* First, report the location of the element with -9.

* Next, convert the value to `NA`.

* Finally, display the value of the vector at this location, and show that it has the value `NA`.

**Solution**

Construct a stripchart of the repaired version of `problem.1.data`. Do you see any indication of an extreme outlier (i.e. 99999) or a -9 being used to represent a missing value?

**Solution**

Leave a Reply

Your email address will not be published. Required fields are marked *