1.8 Finer control over statistics
Slides
Open the slides in a new tab here.
Exercises
- Download the R script here. You know where to put it!
- Run through the examples.
- In the last set of exercises, you compared a log-binomial model to a log-Poisson model with robust standard errors using
{gtsummary}
. Your job now is to do the same usingbroom::tidy()
. You’ll need some extra packages, though, because if you look at thebroom::tidy()
documentation, it doesn’t say anything about adding robust standard errors. The answer, then, is usually to start Googling. I’ve done so for you and found this post (I highly recommend all of Andrew Heiss’s R and statistics explanations!). Use this as a guide to create a dataframe with the results from both models (you can usebind_rows()
to combine them, as in the example). - Return to your final project. You are going to need to do some type of modeling and create some tables and figures, so this is a good time to start playing around!