MulaiMulai sekarang secara gratis

Evaluating imputations: The scale

While the mean imputation might not look so bad when we compare it using a box plot, it is important to get a sense of the variation in the data. This is why it is important to explore how the scale and spread of imputed values changes compared to the data.

One way to evaluate the appropriateness of the scale of the imputations is to use a scatter plot to explore whether or not the values are appropriate.

Latihan ini adalah bagian dari kursus

Dealing With Missing Data in R

Lihat Kursus

Petunjuk latihan

Using the data with already imputed values, ocean_imp_mean:

  • Explore imputations in air temperature (on the x-axis) and humidity (on the y-axis) using a scatter plot, remembering to use color = any_missing.
  • Build upon this previous visualization by faceting by year.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Explore imputations in air temperature and humidity,  
# coloring by the variable, any_missing
ggplot(___, 
       aes(x = ___, y = ___, color = ___)) + 
  geom_point()

# Explore imputations in air temperature and humidity,  
# coloring by the variable, any_missing, and faceting by year
ggplot(___, 
       aes(x = ___, y = ___, color = ___)) + 
  ___() +  
  facet_wrap(~___)
Edit dan Jalankan Kode