Session Ready
Exercise

Linear regression with lm()

While ggplot can display a linear regression trend line using geom_smooth(), it doesn't give you access to the intercept and slope as variables, or allow you to work with the model results as variables. That means that sometimes you'll need to run a linear regression yourself.

Time to run your first model!

taiwan_real_estate is available. TWD is an abbreviation for Taiwan dollars.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Run a linear regression with price_twd_msq as the response variable, n_convenience as the explanatory variable, and taiwan_real_estate as the dataset.