November 2017
Beginner
286 pages
8h 13m
English
Now that we see the outliers do exist within our data, we can address them so that they do not adversely affect our intended study. Firstly, we know that it is illogical to have a negative Coin-in value since machines cannot dispense more coins that have been inserted in them. Given this rule, we can simply drop any records from the file that have negative Coin-in values. Again, R makes it easy as we'll use the subset function to create a new version of our data.frame, one that only has records (or cases) with non-negative Coin-in values.
We'll call our subset data frame noNegs:
noNegs <- subset(MyData, MyData[11]>0)
Then, we'll replot to make sure we've dropped our negative outlier:
boxplot(noNegs[11],main='Gamming ...
Read now
Unlock full access