# Regressing out of the *independent* variable?

Using some software packages it is possible to 'regress out confounding variables from the independent variable x' before plotting x and y.

This makes me wonder: When it is motivated to regress out confounders from x, or both x and y, rather than just from y?

Any pointers on what these different operations mean mathematically, or references, would be very appreciated.

• We can provide plenty of pointers, freely available to you: just search our site for the keywords you have used. Because this question seems focused on understanding what "confounder" means, you might start with that.
– whuber
Nov 26, 2018 at 21:54
• Thanks for your reply. I do however know what the keywords (e.g. confounder) mean. I have not found any reply discussing the separation between the three operations nor treatment tying the formal (mathematical) definition to intuition about the causal graphs. Any literature going into this in particular would be very helpful! Nov 27, 2018 at 15:40