# Controlling for a variable in OLS - Stratification and Reaggregation. Simple Example

In his engrossing book "Naked Statistics" Charles Wheelan begins to explain how controlling for variables works by stratifying the sample. However, he stops short of explaining the reaggregation, leaving one intrigued by the stratification analogy but confused as to whether- and if so, how- it can be applied.

To be more specific, he is looking to isolate the effect of education on weight, by controlling for gender, height, and income. He imagines an experiment in which a number of people (constituting the sample) all gather in one place. Then the stratification begins:

1. Men and women are separated
2. The men and women are separately subdivided by height. At this point, as he says it "There will be a room of 6-foot tall men. Next door, there will be a room of 6-foot 1-inch men"
3. Finally, each of these rooms (identified by combinations of gender and height) can be further subdivided by income. As he puts it: "Eventually we will have lots of rooms, each of which contains individuals who are identical in all respects except for education and weight, which are the two variables we care about. There would be a room of forty-five-year old 5-foot 5-inch men who earn 30,000 to 40,000 a year".

While we can regress weight on education in each of these rooms, how useful is that given that we are looking to end up with a single coefficient that encapsulates the relationship between weight and education observed in each of these rooms?

What magic analysis would need to be performed using data of the people in each of these rooms, which then could be aggregated to obtain the regression coefficient which can be interpreted as the effect of the independent variable of interest on the dependent variable, after we control for the two binary variables? How exactly would the aggregation work?

While I found this question/discussion https://stats.stackexchange.com/questions/17336/how-exactly-does-one-control-for-other-variables interesting, controlling for a variable by its inclusion in a regression is insightful but not a very intuitive answer. Stratification and Reaggregation, if it is possible, shows quite a bit of promise of intuitive understanding.

Illustrative Example with Made up Numbers: On the left are the results of the simple regression of weight on education (after stratifying by income and gender) in each of the 4 rooms (each room with 15 people/observations), whereas on the right are the results of the multiple regression of weight on education, income, and gender (60 people/observations combined).

Is it possible to aggregate the results of the regressions obtained in each of the 4 rooms (stratified by income and gender) to obtain the coefficient on education obtained in the multiple regression (-3.28), in which we control for income and gender?

• It sorta sounds like your question is 'how does regression work'. What is left after controlling for each of those observables is variation between height, weight, and whatever else you do not control for (eating habits, for example). Your parameter represents your sample estimate of the underlying population parameter. It also sounds like you might be interested in Bayesian estimation methods rather than frequentist methods. The former allows you to use information to update a prior on the distribution of beta and the later exploits sample variation to estimate a population parameter. – 123 Dec 8 '18 at 14:14