Summarizing Models with Broom in R
Grace Tompkins, PhD
0:00 / 0:00
Summarizing Models with Broom in R
181 просмотр · 11 месяцев назад
Grace Tompkins, PhD
355 подписчиков
181 просмотр · 11 месяцев назад
In this video, we discuss how to fit models in R and summarize them using the Broom package. We do not go into details of model fitting, but show an example using a simple linear model. We also motivate why linear models may not always be appropriate, and fit a second degree polynomial.
Lecture notes: https://ubc-stat.github.io/stat545/we...
New to ggplot? Check out this video: • Effective Data Visualization with ggplot2 ...
New to dplyr? Check out this video: • Dplyr - Data Manipulation in R (filter, se...
Time stamps:
0:00 - Intro
0:59 - Loading in Packages
1:27 - mtcars Dataset
1:47 - ggplot geom_smooth()
3:06 - Fitting a Linear Model with lm()
5:03 - Broom's tidy() function (summary)
5:49 - Broom's augment() function (prediction)
7:32 - Broom's glance() function (summary)
8:30 - Base R's summary() function
9:48 - Base R's predict() function
10:35 - Fitting Higher Order Polynomials