Examining a model
Let's look at the model unemployment_model
that you have just created. There are a variety of different ways to examine a model; each way provides different information. We will use summary()
(docs), broom::glance()
(docs), and sigr::wrapFTest()
(docs).
The broom
and sigr
packages have been pre-loaded, and unemployment_model
is available for you.
This exercise is part of the course
Supervised Learning in R: Regression
Exercise instructions
- Print
unemployment_model
again. What information does it report? - Call
summary()
onunemployment_model
. In addition to the coefficient values, you get standard errors on the coefficient estimates, and some goodness-of-fit metrics like R-squared. - Call
glance()
on the model to see the performance metrics in an orderly data frame. Can you match the information fromsummary()
to the columns ofglance()
? - Now call
wrapFTest()
on the model to see the R-squared again.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Print unemployment_model
___
# Call summary() on unemployment_model to get more details
___
# Call glance() on unemployment_model to see the details in a tidier form
___
# Call wrapFTest() on unemployment_model to see the most relevant details
___