How it works...

To impute the missing value of the Ozone attribute, we first produce the statistics of the Ozone with the table function. The table function counts 37 NA values in mydata. Using the max function on the table we find the highest count excluding the NA, which is 6, and we can see that 23 is repeated six times. Since we do not have any knowledge about the exact value for NA we assume it can be 23 or near to 23 in most cases. We replace NA with 23. This approach can be changed to find the average or some other ways to find the appropriate value. We repeat the same procedure for the Solar.R attribute.

In some cases, if attributes have so many missing values we can decide that it cannot be used for further analysis.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset