开始使用免费开始使用

评估插补:尺度

当我们用箱线图比较时,均值插补看起来也许不算太差,但了解数据的变异性仍然很重要。因此,您需要探索与原始数据相比,插补值的尺度与分布如何变化。

评估插补尺度是否合适的一种方法是使用散点图,查看这些数值在关系上是否合理。

本练习是课程的一部分

在 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(~___)
编辑并运行代码