On inflated false-positives in interaction analyses, and how to get rid of them.

[This was originally posted on my blog]

In the previous entries to this series I talked about computing power for an interaction analysis (Part 1), interpreting interaction effect-sizes (Part 2), and what sample size is needed for an interaction (Part 3). Here I’m going to talk about an issue that is near and dear to my heart — control variables!

“What?” you ask, “aren’t interaction control variables the same as any other regression?” The answer is simply…NO!

Let’s say you have a regression — Y ~ X + C. ‘C’ here are my ‘control’ variables — variables that index potential…

[Originally published on my blog]

Fill out an online study or two! [Photo by Sigmund on Unsplash]

With covid-19 reaching worldwide, social distancing has become the new norm. Non-essential businesses are closing, people are losing their jobs, and everyone is feeling more isolated. Now, teams of psychologists around the world have started studies investigating the effects of the pandemic on mental health. These projects will help us understand how covid-19 is reshaping the world, and will help mental-health providers address this new reality. Below are links to, and a brief description of, several (currently ongoing) online studies. I am not affiliated with any of these projects. …

[This was originally posted on my blog]

I work a lot with what is sometimes termed ‘hierarchical’ data. That is, data that is clustered in some way. For me, those clusters are sometimes multiple observations from the same person — as is the case with longitudinal data or within-subject manipulations, or they are multiple observations from a larger unit — such as when participants are related to each other or when data comes from several different study sites. Clustered data can bring lots of advantages, but they also come with hurdles that not everyone is familiar with. Primarily, clustered data…

Note: This was first posted on my blog

I first started rock climbing in graduate school with some friends, and quickly grew to love it. The combination of athleticism and the extreme focus needed when you’re on the wall really appealed to me, plus the community is very friendly and welcoming. I’ve stuck with it since, and it is now my main hobby, form of exercise, and place where I see my friends.

The author learns about balance.

A couple of years ago Reddit user higiff created a survey for the climbharder subreddit, which as the name suggestions, is all about training for rock climbing…

[This was originally posted on my blog]

In Part 1 I covered some aspects of what affects power for an interaction analysis, and in Part 2 I talked about interpreting interaction effect-sizes in terms of their ‘simple slopes’.

Let’s start with a hypothetical — there is a main effect which I believe, and it has a effect of r=0.25. I want to collect my own sample to replicate this effect, and I want to test whether this is moderated by a second variable (an interaction). How large a sample should I collect? …

[This was originally posted on my blog]

In the previous post in this series I discussed how to compute power for an interaction (moderation) analysis. In writing that post, I realized that I didn’t have a good intuition for the correspondence between standardized effect sizes and the actual shape of the data. Admittedly, I don’t have the greatest sense of what a standard linear effect looks like either (check out http://guessthecorrelation.com/ if you want to see how good you are), but I at least have a general sense.

If a main-effect is bX = 0.3, with an interaction of bXM…

[This was first posted on my blog]

I conduct interaction (aka ‘moderation’) analyses a lot. As a result, I was interested to read commentaries online about interaction analyses, and the question of how large of a sample is required [1,2]. More recently, results from massive replication efforts, like the Reproducibility Project, have found that interactions were among the effects least likely to replicate [3].

When I first read them, I found these commentaries somewhat difficult to follow, and I thought: “Maybe I don’t understand interactions as well as I thought? Do all interactions need a huge sample size? …

Note: This was originally posted on my blog.

A couple days ago an AI engineer from Google posted about a new palette he developed. This palette, ‘Turbo’, is as colorful as the widely used ‘jet’ palette, but perceptually uniform and color-blind friendly like the viridis palettes. He shared code in python and C for using the palette, but nothing in R. Others have since posted code in R, though a little work is needed to make it usable with my favorite graphics package, ggplot2. This is a short post on how to quickly get started using Turbo with your ggplots.

The three-body problem. Source: Wikimedia.org

My partner (soon to be wife!, Tayler) and I met while we were in the same PhD program. We are both interested in pursuing academic careers, and thus both wanted to do a postdoc. We managed to secure postdoc positions in the same city, and were able to move there together! Here are a handful of things we did that we think helped us pull this off.

Maximized our flexibility

Improving the last prediction

In my first post I showed how to build a simple model, using only genetic information, that predicts height with 53% accuracy in an independent sample. In this post I’m going to improve that model, which will ultimately result in a model with 64% accuracy in an independent sample — an 11% improvement! It’s also slightly simpler — only 4 variables in the regression, instead of 5.

The bulk of the improvement comes from something fairly straightforward — data cleaning. Using just PCA and k-means clustering I identify sources of population stratification and genotyping chip effects. Removing these people from…

David Baranger

PhD in Neuroscience, Postdoc at U Pittsburgh. https://twitter.com/DABaranger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store