# Basic understanding of control variables in observational studies

I'd like to understand the basic logic for control variables in observational studies.

According to Wikipedia, one should control for confounding variables, which "in this context means other factors that not only influence the dependent variable (the outcome) but also influence the main independent variable."

But shouldn't one also control for factors which influence the dependent variable directly? E.g., if I have a data set of ten large marathons and want to investigate the effect of age on marathon times, don't I want to control for the day's temperature (even though this does not influence the runner's age)?

Factors, whose only connection with the considered variables is that they influence only the dependent variable, in particular, have no connection with the independent variable, will not cause bias to your results so they don't have to be controlled. However, they could improve the precision. This paper is a good introduction; in particular, consider model eight therein.

But note how difficult it is to assess influence. E.g. in your example, it might very well be that the temperature is influencing the age because maybe older people will only run at lower temperatures. If, in addition, people run in general faster at lower temperatures, the temperature will be a confounder.

Edit:
Because of the discussion in the comments, I would like to describe how you convince yourself whether there is a causal influence (causal effect) from temperature to age. Imagine you could create lots of experiments (marathons) and that you could arbitrarily set the temperature, i.e. decide about the marathon temperature without being influenced by anything else in the universe. But, while you remove all influence on temperature (removing all "incoming arrows"), you still allow the temperature to influence other variables as it did before (leave all "outgoing arrows" alone). That is an intervention. Then, would there be a stochastic dependence between the age and the temperature? I.e. would there be different probability distributions over age for different values of the temperature? I think so because older people will not run in high temperatures. That is what it means that temperature has a total causal effect on age in this scenario.

Furthermore, this would not work the other way around: If you intervened on the age of the runners, e.g. by simply forbidding older people to run, doing so would not change the temperature. I.e. age is not a cause for temperature in this scenario.

In the same way, intervening on the temperature would still show a dependency between temperature and runtime, while intervening on the runtime, e.g. by just stopping runners for an hour, would not change the temperature. Thus, the temperature is a cause for the runtime but runtime is not a cause for temperature.

Thus, the temperature is a confounder of age and runtime. And confounders are variables that you need to control.

• Thank you @Frank, although unfortunately I cannot access the paper. Re. "Factors that influence only the dependent variable will not cause bias to your results" -- is that correct? There is in fact a strong relationship between temperature and marathon times (no surprise). So if the marathons had very different temperatures and age distributions, wouldn't that bias the results? Also, the Wiki example treats individual age rather than distribution. It claims that age can not have a confounder ("But no other variable determines how old someone is ... So, no control variables are needed here"). Commented Jul 23, 2022 at 11:52
• @sean.mcgrath That is exactly my point: if the temperature influences both the age and the time, then it is a confounder. If, as you presumed, the temperature doesn't have an influence on age, it doesn't create bias. Commented Jul 23, 2022 at 12:30
• @sean.mcgrath The Wikipedia example: I think they are not correct: Take for example the factor "wealth" which influences both "life satisfaction" and age. Thus, older people are happier only because there are fewer poor ones among them, not because age makes you happier. Commented Jul 23, 2022 at 12:50
• The link to the Cinelli et al. paper redirects to the final published version, which is unfortunately behind a paywall. Here is a preprint that's accessible to everyone (as of July 23, 2022): ftp.cs.ucla.edu/pub/stat_ser/r493.pdf Commented Jul 23, 2022 at 13:09
• @dipetkov Thank you, I fixed it. Commented Jul 23, 2022 at 13:58

Yes, both are right. Basically, the idea is that if you omit an important variable in your analysis, then you are going to miss some predictive power. In addition, if the variable you omitted is correlated to some of your independent variables, then your estimates for the coefficients of these variables are going to be biased, and might cause trouble for the interpretation of your analysis. See here.

EDIT:

As @frank said below, if your omitted variable (temperature) is uncorrelated to your independent variable (age), then omitting it should create no bias in your estimate of the coefficient $$b_\text{Age}$$. However, including it could still improve the accuracy of your model, if the effect of temperature on the performance is significant. This is why I highlighted "in addition" above. Adding temperature as a predictor could be useful even if it is uncorrelated to your independent variables.

Regarding your second question, I think that the example is indeed quite strange. In this case, additional variables like "Net wealth", "Widowed?" or "Health measure" could definitely refine the measure of the effect of age on happiness. Yes, they have no causality on age, but age certainly has some forms of causality on them, potentially creating correlation (certainly in this example). So adding them as predictors would definitely be a good idea in my opinion. I think that this is because the article seems to focus on "causal models". Maybe they consider that since age changes by itself without external influence, then they want to consider that the additional effects of the variables I imagined above should be "included" in the global effect of age, since age has a causal impact on them.

Anyway, I suggest you focus on the answers @frank and I have provided for your example with marathon.

• Thank you @FPO. I have two questions then: 1. I understand that if the omitted variable is correlated to my independent variable it will cause problems. But in my example, I don't think that age is correlated with temperature? 2. Does this mean that the example on the page I cited is incomplete? It should add that a variable correlated with age might need to be included? Commented Jul 23, 2022 at 11:44
• I edited my answer to try to make it more complete.
– FP0
Commented Jul 23, 2022 at 12:07
• I see, thank you. I used the marathon example to keep things simple, but coincidentally the topic I am actually trying to understand is the one in the Wiki example. There is an ongoing debate about whether it is legitimate to include additional factors when regressing age vs. well-being (essentially the reasons you give). The article referenced in the example argues strongly that it is not legitimate because e.g., Health is partly a function of age and (unsurprisingly) a strong factor in well-being. Commented Jul 23, 2022 at 12:28
• Then I guess that the question really is is about my sentence here: Maybe they consider that since age changes by itself without external influence, then they want to consider that the additional effects of the variables I imagined above should be "included" in the global effect of age, since age has a causal impact on them. In my opinion it depends on whether you want to aggregate the different effects of age since age is causal on those factors, or if you want to identify them individually, and estimate the remaining effects of age separately.
– FP0
Commented Jul 23, 2022 at 12:30