geom_smooth from the ggplot2 R can 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
You can find my blog post for this episode at [ Ссылка ].
#ggplot2 #dplyr #R #Rstudio #Rstats
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at [ Ссылка ] to get practice problems, tips, and insights.
If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at [ Ссылка ]
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: [ Ссылка ]
General data: [ Ссылка ]
0:00 Introduction
2:08 Exploring precipitation and snow data
6:56 Assessing correlation on daily basis
10:33 Defining the model and fit in geom_smooth
12:06 Using geom_abline to draw a line through data
12:42 Assessing a linear model with multiple parameters
17:15 Improve appearance of figure
19:29 Creating a legend for different models
Ещё видео!