Z: confounding, mediating and moderating variables

The association – between x and y – that we are most interested in is often called “main association”. This is the focus of our analysis. However, sometimes there are other variables that we might find important for this main association. Strictly speaking, those variables are also called “x” (or “covariates”) but for clarity we will label them “z”. There are three important types of z-variables that are common in data analysis:

Types of “z”

ConfounderBoth x and y are affected by z
MediatorA part of the association between x and y goes through z
ModeratorZ affects the association between x and y

Temporality

One thing that is good to keep in mind is the concept of temporality, i.e. timing. When did the phenomena that we are examining happen? This is often the same thing as the time at which the phenomenon was measured – but not always. For example, sometimes data are collected retrospectively (as with case-control studies and retrospective cohort studies), and sometimes survey questions are retrospective (e.g. asking adult respondents about childhood conditions).

Either way, it is important to ascertain the following:

  • Nothing can predict an outcome if it happens after the outcome. In other words, whatever x-variable you have, it must measure something that happened before the phenomenon that your y-variable is thought to capture.
  • A confounder is something that is believed to affect the x-variable and the y-variable. Therefore, it cannot measure something that happened after the x-variable and/or after the y-variable.
  • A mediator is something that is believed to be affected by the x-variable as well as affect the y-variable. This means that is cannot come before the x-variable or after the y-variable.
  • A moderator is something that is thought to affect the effect of the x-variable on the y-variable. It cannot come after the y-variable.

The details might still be a bit murky at this point, but we will return to all of them later in this chapter.