1. Introduction
I like @EpiGrad's answer (+1) but let me take a different perspective. In the following I am referring to this PDF document: "Multiple Regression Analysis: Estimation", which has a section on "A 'Partialling Out' Interpretation of Multiple Regression" (p. 83f.). Unfortunately, I have no idea who is the author of this chapter and I will refer to it as REGCHAPTER. A similar explanation can be found in Kohler/Kreuter (2009) "Data Analysis Using Stata", chapter 8.2.3 "What does 'under control' mean?".
I will use @EpiGrad's example to explain this approach. R code and results can be found in the Appendix.
It also should be noted that "controling for other variables" does only make sense when the explanatory variables are moderately correlated (collinearity). In the aforementioned example, the Product-Moment correlation between exposure and covariate is 0.50, i.e.
> cor(covariate, exposure)
[1] 0.5036915
2. Residuals
I assume that you have a basic understanding of the concept of residuals in regression analysis. Here is the Wikipedia explanation: " If one runs a regression on some data, then the deviations of the dependent variable observations from the fitted function are the residuals".
3. What does 'under control' mean?
Controlling for the variable covariate, the effect (regression weight) of exposure on outcome can be described as follows (I am sloppy and skip most indices and all hats, please refer to the above mentioned text for a precise description):
$\beta_1=(\sum resid_{i1} \cdot y_i)/(\sum resid^2_{i1})$
$resid_{i1}$ are the residuals when we regress exposure on covariate, i.e.
$exposure = const. + \beta_{covariate} \cdot covariate + resid$.
The "residuals [..] are the part of $x_{i1}$ that is uncorrelated with $x_{i2}$. [...] Thus, $\hat{\beta}_1$ measures the sample relationship between $y$ and $x_1$ after $x_2$ has been partialled out" (REGCHAPTER 84). "Partialled out" means "controlled for".
I will demonstrate this idea using @EpiGrad's example data. First, I will regress exposure on covariate. Since I am only interested in the residualslmEC.resid, I omit the output.
summary(lmEC <- lm(exposure ~ covariate))
lmEC.resid <- residuals(lmEC)
The next step is to regress outcome on these residuals (lmEC.resid):
[output omitted]
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.45074 0.02058 119.095 < 2e-16 ***
lmEC.resid 0.50000 0.07612 6.569 2.45e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
[output omitted]
As you can see, the regression weight for lmEC.resid (see column Estimate, $\beta_{lmEC.resid}=0.50$) in this simple regression is equal to the multiple regression weight for covariate, which also is $0.50$ (see @EpiGrad's answer or the R output below).
Appendix
R Code
set.seed(1)
covariate <- sample(0:1, 100, replace=TRUE)
exposure <- runif(100,0,1)+(0.3*covariate)
outcome <- 2.0+(0.5*exposure)+(0.25*covariate)
## Simple regression analysis
summary(lm(outcome ~ exposure))
## Multiple regression analysis
summary(lm(outcome ~ exposure + covariate))
## Correlation between covariate and exposure
cor(covariate, exposure)
## "Partialling-out" approach
## Regress exposure on covariate
summary(lmEC <- lm(exposure ~ covariate))
## Save residuals
lmEC.resid <- residuals(lmEC)
## Regress outcome on residuals
summary(lm(outcome ~ lmEC.resid))
## Check formula
sum(lmEC.resid*outcome)/(sum(lmEC.resid^2))
R Output
> set.seed(1)
> covariate <- sample(0:1, 100, replace=TRUE)
> exposure <- runif(100,0,1)+(0.3*covariate)
> outcome <- 2.0+(0.5*exposure)+(0.25*covariate)
>
> ## Simple regression analysis
> summary(lm(outcome ~ exposure))
Call:
lm(formula = outcome ~ exposure)
Residuals:
Min 1Q Median 3Q Max
-0.183265 -0.090531 0.001628 0.085434 0.187535
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.98702 0.02549 77.96 <2e-16 ***
exposure 0.70103 0.03483 20.13 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.109 on 98 degrees of freedom
Multiple R-squared: 0.8052, Adjusted R-squared: 0.8032
F-statistic: 405.1 on 1 and 98 DF, p-value: < 2.2e-16
>
> ## Multiple regression analysis
> summary(lm(outcome ~ exposure + covariate))
Call:
lm(formula = outcome ~ exposure + covariate)
Residuals:
Min 1Q Median 3Q Max
-7.765e-16 -7.450e-18 4.630e-18 1.553e-17 4.895e-16
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.000e+00 2.221e-17 9.006e+16 <2e-16 ***
exposure 5.000e-01 3.508e-17 1.425e+16 <2e-16 ***
covariate 2.500e-01 2.198e-17 1.138e+16 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 9.485e-17 on 97 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 3.322e+32 on 2 and 97 DF, p-value: < 2.2e-16
>
> ## Correlation between covariate and exposure
> cor(covariate, exposure)
[1] 0.5036915
>
> ## "Partialling-out" approach
> ## Regress exposure on covariate
> summary(lmEC <- lm(exposure ~ covariate))
Call:
lm(formula = exposure ~ covariate)
Residuals:
Min 1Q Median 3Q Max
-0.49695 -0.24113 0.00857 0.21629 0.46715
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.51003 0.03787 13.468 < 2e-16 ***
covariate 0.31550 0.05466 5.772 9.2e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2731 on 98 degrees of freedom
Multiple R-squared: 0.2537, Adjusted R-squared: 0.2461
F-statistic: 33.32 on 1 and 98 DF, p-value: 9.198e-08
> ## Save residuals
> lmEC.resid <- residuals(lmEC)
> ## Regress outcome on residuals
> summary(lm(outcome ~ lmEC.resid))
Call:
lm(formula = outcome ~ lmEC.resid)
Residuals:
Min 1Q Median 3Q Max
-0.1957 -0.1957 -0.1957 0.2120 0.2120
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.45074 0.02058 119.095 < 2e-16 ***
lmEC.resid 0.50000 0.07612 6.569 2.45e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2058 on 98 degrees of freedom
Multiple R-squared: 0.3057, Adjusted R-squared: 0.2986
F-statistic: 43.15 on 1 and 98 DF, p-value: 2.45e-09
>
> ## Check formula
> sum(lmEC.resid*outcome)/(sum(lmEC.resid^2))
[1] 0.5
>