Distributed lag non-linear models

Welcome / Disclaimer This is the beginning of a series of blog posts where I publicly stumble my way through figuring out some confusing, complicated, and, frankly, cutting-edge modeling and statistics.

DLNMs: building and visualizing crossbasis functions

This is the second post in a series about distributed lag non-linear models. Please read the first post for an introduction and a disclaimer. The dlnm package The dlnm package offers two ways of fitting crossbasis functions: an “internal” and an “external” method.

Working with matrix-columns in tibbles

What’s a matrix-column? The tibble package in R allows for the construction of “tibbles”—a sort of “enhanced” data frame. Most of these enhancements are fairly mundane, such as better printing in the console and not modifying column names.

Treat your treatments as continuous

Taking a potentially continuous treatment, binning it into categories, and doing ANOVA results in reduced statistical power and complicated interpretation. Yet, as a graduate student, I was advised to bin continuous treatment variables into categories multiple times by different people.

Three ways to plot logistic regressions

If your data is just 1’s and 0’s, it can be difficult to visualize alongside a best-fit line from a logistic regression. Even with transparency, the overplotted data points just turn into a smear on the top and bottom of your plot, adding little information.

Looking under the hood with debug()

If you’ve ever tried to look “under the hood” of an R function, you know that sometimes it can be tricky to figure out what’s going on, especially if you use R more as a statistical tool than as a programming language.

COVID-19 pushed me to try something new in my classroom, and I loved it!

In March (which feels like years ago, now), when Universities started seriously thinking about their response to COVID-19, I was teaching Ecological Models and Data as instructor of record and finishing my dissertation up.

Hacking GLMs to fit population growth models

I’m currently teaching Ecological Statistics and Data, a class I inherited from Lee Brown and Elizabeth Crone. In a lecture on population dynamics, they do some really cool things with generalized linear model—things that I don’t think are standard practice and as far as I can tell from googling, aren’t well documented.

Tea Science Tuesday

Tea Science Tuesdays are Instagram live streams where I’ll talk informally about some aspect of tea science while enjoying some tea. Each week, there will be a topic, a suggested tea if you want to drink along, and a suggested “reading” (sometimes a video).

My first R package is on CRAN!

I woke up this morning to an email saying my first R package, holodeck, was on it’s way to CRAN! It’s a humble package, providing a framework for quickly slapping together test data with different degrees of correlation between variables and differentiation among levels of a categorical variable.