Python

The Promises and Pitfalls of Variance Partitioning

Feel free to play around with my code, which is available here. Some days - between an unchecked global pandemic, the breakdown of voting rights, widespread police brutality, and whatever else is adding stress to your life - the world feels pretty chaotic. But even amid this apparent chaos, our world contains a lot of predictable structure. This is because we’re surrounded by natural covariance: taller people also have bigger feet, fitter people have a lower heart rate, and being outdoors also means being exposed to more light (and Vitamin D!

How Much Data Do You Need to Run a Classification Analysis?

All code for these analyses is available here. Imagine that you’re an epidemiologist who’s curious whether people who fall ill with COVID-19 differ from those who don’t along several dimensions that measure their health and demographics. Or, imagine that you’re a cognitive neuroscientist who’s curious whether a particular brain region responds differently to two types of images - for example, large and small objects. In both cases, you might want to use a classification analysis to understand whether the categories (infected vs.