there might be a common antecedent that both improves your mood and causes you to listen to music. As a silly example, maybe you love shopping for jeans, and clothing stores tend to play music, so your mood will, on average, be better on the days you hear music for this reason alone.
There might be a common antecedent that both worsens my mood and causes me to listen to music. As a silly example, maybe I hate shopping for jeans, but clothing stores tend to play music, which actually improves my mood enough to outweigh the shopping. That is, confounding could go both ways here; the effect could be greater than it appears, rather than less.
An intention-to-treat approach where you make the random booleans the explainatory variable would be better, as in less biased and suffer less from confounding.
I’ll reanalyse that way and post results, if I remember.
How was this accomplished, technically?
I made a script run in the background on my PC, something like
while true:
qt = random(0, INTERVAL)
while time() % INTERVAL < qt:
sleep(1)
announce_interruption()
mood = popup_input("mood (-1 to 1):")
earworm = popup_input("song in head (N/D/R/O):")
save_to_log(time(), mood, earworm)
sleep(INTERVAL - time() % INTERVAL)
The “constrained by convenience” part means that I recorded data when and only when I was at my PC. More reliable would be to run such a script on a device that’s with you most of the time, like a smartphone or smartwatch, but I’ve no such device.
I added intention-to-treat statistics in an addendum.