開始使用免費開始

評估插補:尺度

當我們用盒狀圖比較時,平均值插補看起來也許不算太糟,但掌握資料的變異性仍然很重要。因此,你需要探索插補後的數值,其尺度與分散是否相較於原始資料有所改變。

評估插補尺度是否合適的一種方法,是使用散佈圖來觀察數值是否合理。

本練習屬於課程

在 R 中處理遺漏值

檢視課程

練習說明

使用已包含插補值的資料 ocean_imp_mean

  • 以散佈圖探索空氣溫度(x 軸)與濕度(y 軸)的插補情形,並記得使用 color = any_missing
  • 在前述視覺化基礎上,加入依年份分面的呈現。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# 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(~___)
編輯並執行程式碼