Let's say I want to see the effect of having a pool on the price of properties in a city. What does it really mean to control for zipcodes?

And does this answer the crucial question that I want to include the effect of zipcodes into my analysis?

  • 1
    $\begingroup$ In econometrics "to control" means "to account for". But I think a more elaborated answer exists. $\endgroup$
    – manifold
    Commented Apr 23, 2022 at 4:17

1 Answer 1


Summarised explanation:

Controlling for a variable essentially means you're measuring an independent variable and accounting for its presence to negate/remove its flow-on effects on other variables and the dependent variable (e.g. interaction effects, omitted variable bias, (multi-)colinearity etc.)

So when we control for zipcodes, we are taking actions in our statistical analysis (regression) to ensure that we factor in the direct and indirect effects of zipcodes in our statistical model to make it efficient and not result in incorrect readings due to statistical bias. To achieve this, we can use techniques such as but not limited to: multi-linear regression, interaction variables.

Detailed explanation:

If your goal is to analyse the pure effect of having a pool installed at a property on its price, "controlling for" zipcodes would be to make sure that the impact of zipcodes (e.g. living in a rich or poor socio-economic area) doesn't influence the reading (co-efficient) for the variable we're looking to see the pure effect of (in this case, pools increasing house prices).

So in the case where you do a single variable analysis (a mono-linear/simple regression): [how does <hasPool> impact <housePrice>], the variable hasPool will have an inaccurate statistical significance and also an overstated effect value (the variable hasPool will incorporate other things such as the fact that "rich zipcodes have pools, rich zipcodes also increase house prices"). This situation is omitted variable bias (you've forgotten to factor in zipcodes and part of their effect is being read as being as a result of having a pool).

NB: This doesn't mean simple regressions are bad or useless. They're very helpful to quickly triage if a variable is worth considering into a model before committing to factoring it into the model. This is because it's quicker to to get a quick (but of course as noted above, very inprecise) look at the variable rather than immediately imputting into the model you are using which (if it has loads of data and many variables) could take ages to finish processing. However, you shouldn't be using a simple regression to find out the pure effect of an independent variable on its own - instead a multi-linear regression is more effective.

You could then do a multi-linear regression (analysis incorporating more than one variable) such as: [how do <hasPool> and <locatedInRichZipcode> impact <housePrice>]. The variables hasPool and locatedInRichZipcode are now both being factored into what causes increases in house price. hasPool is now more accurate, as the fact that the effect of being located in a rich zipcode is also being measured. However the co-linearity (high correlation between two variables) between having a pool and being in a rich zipcode increases the standard errors of the co-effecients, and thus could result in the variable being incorrectly found to be statistically insignificant, and also makes the pure effect of the variables measured blurred.

However, being in a rich zipcode and having a pool are closely related occurances, so we'd need to also incorporate an interaction variable hasPoolAndLocatedInRichZipcode to account for the venn-diagram "shared-zone" effect of having both a pool and being in a rich area: [how do <hasPool>, <locatedInRichZipCode>, and <hasPoolAndLocatedInRichZipcode> impact <housePrice>].

This is a more effective regression and though the statistical analysis improvements in "controlling" (i.e. taking into account) zipcodes and their effect, we are better able to approximate what the pure effect (co-efficient) of a variable such as having a pool is on house prices.

Please note!

Of course, the above examples are an extreme simplification of what variables should be included and how some of the techniques work to make the explanation more straightforward to read. Other regression techniques could be used and obviously variables such say how many rooms, the sqft size of a house should be factored, the size of pool (a large olympic pool may make the house very valuable, whereas a teeny hot tub sized pool may suck and may burden the house's value) in order to gain a more accurate regression and ever more accurate reading of what the pure effect (co-efficient) of the variable hasPool is.

Why do I say "ever more accurate"? - Well, that's because there's basically an infinite amount of variables that could impact a house price, and thus we can never find out what the EXACT pure effect of the variable hasPool is. In a perfect world, we could hypothetically run a regression with the nigh-infinite amount of variables, but due to limitations such as research budget, availability of data, complexity of the regression model that the computer needs to analyse (increasing processing time) etc., it's best that we try to compact the amount of variables observed in the regression to make an efficient but never perfect regression to analyse the effect.

Hope this helps! If you want to learn in more explicit detail about controlling for variables or just stats/econometrics in general, I absolutely recommend reading Statistics By Jim!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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