房屋面积的 Log10 变换
您刚刚看到自变量 sqft_living 呈右偏分布,因此需要进行以 10 为底的对数变换来消除偏态。就像视频中把因变量 price 转换为 log10_price 一样,我们也对 sqft_living 做同样的处理。
本练习是课程的一部分
Tidyverse 的数据建模
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Load packages
library(moderndive)
library(dplyr)
library(ggplot2)
# Add log10_size
house_prices_2 <- house_prices %>%
___(___ = ___(___))