Now that we have a fitted model we will need to pull some summary information from it we will use two extremely fun functions from the {broom} package to help us out (tidy() & glance()).
tidy() - Has a bunch of versatility, but for our context it can take our model object and return our model coefficients into a nice tibble.
broom::tidy(lm_form_fit) %>% knitr::kable()
term
estimate
std.error
statistic
p.value
(Intercept)
-300.250929
14.5815154
-20.59120
0
Longitude
-2.013412
0.1296788
-15.52615
0
Latitude
2.781713
0.1816642
15.31239
0
glance() - allows us in this context to convert our model’s summary statistics into a tibble