Interactive statistics and coding GLMs

Hello there!

Many greetings from Ulm, Germany! Currently, I'm experimenting with the format of this newsletter. Today, things will be short. Don't worry, though. For more extensive work, I'll always have my blog.

Interactive statistics

Some statistical concepts are better explained interactively. I learned that the hard way when I tried to explain the variance of the sample variance to my students. Unfortunately, I completely botched that explanation. Oops!

But to make up for it, I build an interactive Shiny app. This way, students can follow along my (written) explanations at their own speed. This was the start of my statistical concepts app.

Shortly after its first creation, the app grew in size and its code was an 800 line, single file mess. Obviously, that was a poor design choice on my end. Hence, I've rebuilt the app with {golem} so that the app can keep growing (once the upcoming semester starts).

Soon, I'll create a {golem} video for you. Hopefully, it will help you to built larger apps with cleaner code. For a first taste, check out my demo of Shiny modules. These are powerful ingredients for large apps and reusable code.

Generalized linear models (encore)

By now, you're probably up to speed on the math of generalized linear models. If not, check out the thread I wrote a while back.

Well, I've got an encore for you. I wrote another thread on the implementation of GLMs with R. And it does not only cover the standard implementation with {stats}, it also shows you the fancy shmancy {tidymodels} way.

But {tidymodels} is more than a fancy facelift. It's an ecosystem that can take care of sooo many crucial steps in the modeling workflow (e.g. data splitting and cross-validation).

To keep it simple, though, the thread covers only model fitting. In the corresponding blogpost, you will find the full-blown math AND coding experience. And for more about {tidymodels}, my YARDS lecture notes can help you.

Recommended resources

  • Slidecraft 101 by Emil Hvitfeldt: This week, Emil started a multi-part series on building slides with Quarto. The first installment rocks and I can't wait to see what's next.

  • Mastering Shiny by Hadley Wickham: This is THE book for Shiny. It starts with a superb getting started guide and continues with many advanced features. It's available for free online or you can buy a paperback copy on Amazon.

  • Tidy Modeling with R by Max Kuhn and Julia Silge: I think this is probably the most in-depth treatment of {tidymodels} out there. It's available for free online or as paperback copy on Amazon. Bonus: Max and Julia recently gave a great keynote on {tidymodels}.

Thank you for reading this week's issue. As always, I am happy to hear your feedback. I'm only one quick click way. Just send me a message via Twitter or reply to this mail.

Enjoy the rest of your day!Albert

Reply

or to participate.