I understand the idea behind regressions and know how to interpret them, however, when I hear the term "capturing the effect of.." or "controlling for.." so far I've just accepted it without questioning how the regression actually manages to do so, just by including a variable in the equation.

Can somebody explain (maybe even with math) why exactly this capturing of effects or controlling for variables works just by including a variable in my regression?


I may try to loosely help you to formalize these ideas by one example. Suppose you want to model monthly sales as function of two guys:

  • time measured in months passed
  • month name

First, without month name. You model Y (sales volume) ~ time + some positive number (+ error). It can be that the sales grow steadily for 5 years, and you beta coefficient for time gives you the idea of how many sales you get depending on number of months passed.

"controlling for.."

An additional positive number is here to compensate the fact your sales time-series is always positive, or, this number controls for the mean sales over all history that you have got.

You, next, want to make you model more exact by adding the nuances which result from different time of year (month names). E.g., sales rise high on Christmas.

You add 11 binary input variables to your experiment matrix, where each variable decodes different months. Run you model: Y ~ time + month_name + some positive number (+ error).

That is the time to challenge your question:

"capturing the effect of.."

For each month there will be a coefficient showing how much of increase of deacrease this month brings about realtive to sales volume. Let's say, December coefficient = 2.5, meaning that in December your sales will increase additively by 2.5 units. July would be -1.3, this is to say in July sales drob by 1.3 units.

This way you capture the effect of month.

There can be more sense and examples to your question, but as a starting point it feels enough.

| cite | improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.