Fitting and visualizing linear regression models with the ggplot2 R package (CC237)

August 8, 2022 • PD Schloss • 1 min read

geom_smooth from the ggplot2 R package will fit linear regression models through your data, but what if you want the coefficients or you want to fit a more complex model? In this episode Pat shows how to use R’s lm and predict functions to fit linear models to predict the precipitation equivalents from the amount of snow and the high daily temperature. He does all this using local weather data downloaded from NOAA in RStudio with a lot of help from the tidyverse

Code

You can browse the state of the repository at the