# Is it confounding variable?

Here is a snippet from here:

Consider the example of a trial studying the relationship between coffee drinking (the exposure or “intervention”) and myocardial infarction (the outcome). Suppose an association is found, but in fact more coffee drinkers than nondrinkers smoked cigarettes and it was actually the smoking that was associated with MI.

In this article, smoking is called a confounding variable, but I think it's wrong.

We don't know if there is a causality between smoking and coffee drinking. They are only correlated, that's it.

So smoking is just another variable that happens to be the real cause of the myocardial infarction, it's not necessarily a confounding variable.

Am I right?

Here, smoking is the confounder.

The exposure is coffee drinking and the outcome is heart attack.

To be a confounder the variable has to be a cause, or a proxy for a cause of both the exposure and the outcome. It does not have to be a direct cause.

So here, it is sufficient for there to simply be correlation between coffee drinking and smoking, because they share a common cause.

One of the best way to understand confounding, and causal inference in general is to use Directed Acyclic Graphs (somtimes called Causal diagrams). See work by Judea Perl on causality for details of the underlying theory. To illustrate, consider the following DAG:

This was produced with DAGgity (www.dagitty.net), a free online too which implements DAG theory with a view to explaining confounding and to inform the minimal set of covariates to adjust for in a regression model to obtain the true causal effect. You may want to click on the figure to get a more detailed view. Here E is the exposure and D is the outcome. A is a cause of both E and D, so is obviously A is a confounder, and DAGgity tells us in the top right hand corner that if we adjust for A in a regression model we can obtain the true total causal effect of E on D. It is important to understand that this is the case only is the DAG is "correct" (ie we have included all relevant variables and the directions of causality.

Now, note that in the top left corner it says that variable A is "adjusted" - that means we have observed it. However, in the particular example in your question, we haven't observed it (we may have no idea what it is, only that it exists), instead, we have observed S (smoking) and now we have the following DAG:

So, there is no causal relationship between smoking (S) and our exposure (E), but they will be correlated due them having a common cause (A). Note that in the top left corner we have specified A as unobserved, and in the top right corner DAGgity tells us that we simply need to adjust for S (smoking). So coffee drinking isn't a "true" confounder, it is a proxy for A, which is the true (unobserved) confounder, and that is probably at the heart of the confusion here.

Now, let's introduce another, unobserved, confounder, B:

DAGgity now tells us that we cannot estimate the true causal effect, and that is because we have residual (confounding) due to the unobserved confounder B. Sadly, this is often the case in observational studies, which is why clinical trials are considered the gold standard in terms of causality (this is not to say that trials are always perfect.). This also explains why it is sometimes said that correlation is "poor definition" of a confounder: the correlation between smoking and coffee drinking is not solely due to A, it is distorted by B.

To sum up, the issue has to do with "true" confounders, and "proxy" confounders, and whatever assumptions are made (or not made !) about unobserved variables and the causal relationships.

• You have been misled. I agree that it is not perfect, because we have not observed the true confounder, we have only observed a proxy for it. So there will likely be residual confounding. It is very rare to find a situation on observation studies where there is no residual confounding. I will update the question shortly to try to expand on this. Commented Jan 9, 2020 at 9:28
• "To be a confounder the variable has to be a cause, or a proxy for a cause of both the exposure and the outcome. It does not have to be a direct cause." -- This is still not the general definition of confounder at least according to some authors. Pearl defines a confounder to be any variable induces a spurious association between two variables. In the pattern $X \leftarrow A \rightarrow Z \leftarrow B \rightarrow Y$, $A$ is a confounder of X and Y, and yet it causes only $X$. More complicated patterns are possible. You are right that smoking is a confounder. Commented Jan 9, 2020 at 10:09
• @NeilG yes, that would be spurious confounding. I wanted to keep it simple here, since that's unlikely to be at work in this actual example as hundreds of studies have raised the smoking/coffee issue. Commented Jan 9, 2020 at 10:13
• Do you have a definition for "spurious confounding"? Where can I read more about it? Commented Jan 9, 2020 at 10:29
• @NeilG No, I may have just made that up ! I thought it had come up at a causal inference workshop a few months ago part of which was based on this. However it's not mentioned there and I don't recall the exact context in which it came up, except that it was related to a fairly pathological DAG like the one you gave in your first comment. Very interesting though ! Happy to discuss further in chat if you like ? As for the definition of confounding, Perl's one is more general, but less useful I feel. Commented Jan 9, 2020 at 11:02

As a somewhat less technical answer, and not necessarily going into strict definitions and associations of what counts as proper causality what does not etc:

The word 'to confound' itself means "to mistake / confuse something for something else".

A confounding variable, therefore, putting strict technical contexts aside, is a variable [whose effect] is mistaken for that of another. In this case, the effects of smoking are unaccounted for and thus wrongly attributed to that of coffee consumption, when in fact it has no [direct] effect once smoking is taken into account. Thus smoking is the 'confounding variable'.

Arguing about definitions generally tends not to be a very fruitful or useful form of argument, unless the discussion is explicitly "what is the strict definition of X given context Y". In the passage you quote, they are effectively defining confounding as per that example. You're effectively saying you disagree with that definition. That's fine. As long as you use it in a context where your definition is that understood by your peers and can be put to use, then it is appropriate.

It may be that in some stricter contexts there is a stricter definition where the above example does not count as causality. But smoking as a proxy for the effects of coffee in cancer is THE textbook example of confounding, and I would say that this is what most people understanding confounding to mean, i.e. "we wrongly attributed the effect to X, when in fact controlling for Y made the effect from X disappear".