<p>The situation is given in the following picture
<a href="https://i.sstatic.net/m9vVe.png" rel="noreferrer"><img src="https://i.sstatic.net/m9vVe.png" alt="enter image description here" /></a></p>
<p>The black line is the true conditional mean <span class="math-container">$E(y|x)$</span>. If we truncate the data, all observations above the truncation <span class="math-container">$Y^A$</span> are not observed.</p>
<p>For low values of <span class="math-container">$x$</span>, we will observe (on average) lower values of <span class="math-container">$y$</span> than we would without the truncation. As such, when <span class="math-container">$x$</span> is low, the observed conditional mean function (in blue) will be lower than the true one. If you fit a linear function through the observed points (say in red), you will therefore fit a linear function approximating the blue one. This will be a function with a flatter slope (compared to the true conditional mean in black).</p>
<p>The following is not exact, but only gives an idea how I would approach the problem analytically.</p>
<p>Assume that the true data generating process be given by:
<span class="math-container">$$
y_i = \beta_0 - \beta_1 x_i + \varepsilon_i.
$$</span>
Where, as usual, <span class="math-container">$E(\varepsilon_i) = 0$</span> and <span class="math-container">$E(\varepsilon|x_i) = 0$</span>. The conditional mean function is then equal to:
<span class="math-container">$$
E(y_i|x_i) = \beta_0 - \beta_1 x_i + E(\varepsilon_i|x_i) = \beta_0 - \beta_1 x_i.
$$</span></p>
<p>Now let <span class="math-container">$z_i$</span> be the random variable equal to 1 iff observation <span class="math-container">$i$</span> is not truncated, i.e. when
<span class="math-container">$$
 \beta_0 - \beta_1 x_i + \varepsilon_i &lt; Y^A.
$$</span>
If <span class="math-container">$i$</span> is not observed, i.e. truncated, we have <span class="math-container">$z_i = 0$</span>.</p>
<p>Then the observed conditional mean equals:
<span class="math-container">$$
E(y_i|x_i,z_i=1) = \beta_0 - \beta_1 x_i + E(\varepsilon_i|x_i, z_i = 1).
$$</span>
The last term is given by:
<span class="math-container">$$
E(\varepsilon_i|x_i, z_i = 1) = E(\varepsilon_i|x_i, \varepsilon_i &lt; Y^A - \beta_0 +  \beta_1 x_i)
$$</span>
This last term, which is a function of <span class="math-container">$x_i$</span> is negative (as <span class="math-container">$\varepsilon_i$</span> is truncated from above and the mean of the untrunctated <span class="math-container">$\varepsilon$</span> is zero). Define:
<span class="math-container">$$
E(\varepsilon_i|x_i,\varepsilon_i &lt; Y^A - \alpha_0 +  \alpha_1 x_i)  = g(x_i).
$$</span>
we have that <span class="math-container">$g(x_i) &lt; 0$</span> and in general, we would expect that <span class="math-container">$g'(x_i) &gt; 0$</span>, because the restriction is less binding if <span class="math-container">$x_i$</span> becomes bigger (This however is probably not always the case, as <span class="math-container">$g$</span> depends on the shape of the joint distribution of <span class="math-container">$\varepsilon_i$</span> and <span class="math-container">$x_i$</span>.)</p>
<p>Then we have:
<span class="math-container">$$
E(y_i|x_i, z_i = 1) = \alpha_0 + \beta_1 x_i + g(x_i),
$$</span>
This is the blue curve in the picture.
The slope of this line equals:
<span class="math-container">$$
\frac{\partial E(y_i|x_i, z_i = 1)}{\partial x_i} = -\beta_1 + g'(x_i)
$$</span>
The right hand side of the first equation is bigger than <span class="math-container">$-\beta_1$</span> (so the slope is flatter).</p>
<p>Notice that in general, the conditional mean will alsono longer be a linear function of <span class="math-container">$x_i$</span>, so there will also be a specification bias. This also makes it not trivial to determine what exactly the bias will be from fitting a linear function.</p>
<p>Lowering the value of <span class="math-container">$Y^A$</span> will lead to a larger bias (more negative <span class="math-container">$g(x_i)$</span>) and probably also to a flatter slope of the estimated regression. I hope this is intuitive from the picture above.</p>

CC BY-SA 4.0
2021-05-10T17:35:33.813Z
Well written, after it was mentioned it was not powers, I was able to deduce this but the graphs you provided really show it properly.
Bazinga
CC BY-SA 4.0
2021-04-27T17:11:03.927Z
2021-04-27T17:11:03.927Z
tdm
<p>To estimate a simple linear regression:</p>
<p><span class="math-container">$$ y = \beta_0 + \beta_1 x + \epsilon $$</span></p>
<p>I have the assumptions that a researcher <span class="math-container">$A$</span> can only sample individuals with a value <span class="math-container">$y &lt; y^A$</span>. Similarly, a researcher <span class="math-container">$B$</span> can sample individuals with a value <span class="math-container">$y &lt;y^B$</span>, with <span class="math-container">$y^B &lt; y^A$</span>. I also know that <span class="math-container">$\beta_1 &lt; 0$</span>.</p>
<ol>
<li>Are the estimates from the researchers <span class="math-container">$A$</span>, <span class="math-container">$B$</span> going to be biased?</li>
<li>If so, which one is likely to be more biased?</li>
<li>How can I illustrate that graphically?</li>
</ol>
<p>What I have tried so far, is to assume that <span class="math-container">$y^A = (\hat{\beta_0} + \hat{\beta_1}x)^A$</span> and then I tried to derive the OLS for this model instead but I stumble upon calculations, i.e.
<span class="math-container">$$  \partial{(SSR)}/\partial{\beta_0}  = -2A \sum{\left( y_i - (\beta_0 + \beta_1 x_i)^A\right) \left(  \beta_0 + \beta_1 x_i\right)^{A-1}} = 0$$</span></p>
<p>How do I get along from here? I have some intuition that I should use a logarithmic approach?</p>

CC BY-SA 4.0
2021-04-27T12:48:06.947Z
$A$ and $B$ are not powers, but correspond to notations for selected subsamples.
Bertrand
CC BY-SA 4.0
2021-04-27T12:57:34.350Z
This case is known as "truncated data" [see for example here](https://www.bauer.uh.edu/rsusmel/phd/ec1-24.pdf). In general the estimates are biased. If $\beta_1 < 0$ and truncation is from above, we would expect the absolute value of the estimate of $\beta_1$ to be too small.
tdm
CC BY-SA 4.0
2021-04-27T13:40:43.430Z
Thank you both for your answers and @tdm thank you for the link provided. I am going through it now, but I fail to see which truncated case (it seems there are plenty) applies this particular example in my question. Could you provide an answer tailored to this specific question? How can you see that the absolute value of $\beta_1$ will be too small?
Bazinga
<econometrics><optimization><linear-algebra><selection-bias>
Regression Optimization problem under constraints
Bazinga
# Regression Optimization problem under constraints

(Asked by: username_0 on 2021-04-27)

To estimate a simple linear regression:

$$ y = \beta\_0 + \beta\_1 x + \epsilon $$

I have the assumptions that a researcher $A$ can only sample individuals with a value $y < y^A$. Similarly, a researcher $B$ can sample individuals with a value $y , with $y^B < y^A$. I also know that $\beta\_1 < 0$.

1. Are the estimates from the researchers $A$, $B$ going to be biased?
2. If so, which one is likely to be more biased?
3. How can I illustrate that graphically?

What I have tried so far, is to assume that $y^A = (\hat{\beta\_0} + \hat{\beta\_1}x)^A$ and then I tried to derive the OLS for this model instead but I stumble upon calculations, i.e.
$$ \partial{(SSR)}/\partial{\beta\_0} = -2A \sum{\left( y\_i - (\beta\_0 + \beta\_1 x\_i)^A\right) \left( \beta\_0 + \beta\_1 x\_i\right)^{A-1}} = 0$$

How do I get along from here? I have some intuition that I should use a logarithmic approach?

**Tags:** econometrics, optimization, linear-algebra, selection-bias
> **Comments:**
> **username_1**: $A$ and $B$ are not powers, but correspond to notations for selected subsamples.  
> **username_2**: This case is known as "truncated data" [see for example here](https://www.bauer.uh.edu/rsusmel/phd/ec1-24.pdf). In general the estimates are biased. If $\beta_1 < 0$ and truncation is from above, we would expect the absolute value of the estimate of $\beta_1$ to be too small.  
> **username_0**: Thank you both for your answers and @tdm thank you for the link provided. I am going through it now, but I fail to see which truncated case (it seems there are plenty) applies this particular example in my question. Could you provide an answer tailored to this specific question? How can you see that the absolute value of $\beta_1$ will be too small?  

---

## 1 answers

### Answer by username_2 on 2021-04-27. Score: 7 | Accepted answer

The situation is given in the following picture
[![enter image description here](https://i.sstatic.net/m9vVe.png)](https://i.sstatic.net/m9vVe.png)

The black line is the true conditional mean $E(y|x)$. If we truncate the data, all observations above the truncation $Y^A$ are not observed.

For low values of $x$, we will observe (on average) lower values of $y$ than we would without the truncation. As such, when $x$ is low, the observed conditional mean function (in blue) will be lower than the true one. If you fit a linear function through the observed points (say in red), you will therefore fit a linear function approximating the blue one. This will be a function with a flatter slope (compared to the true conditional mean in black).

The following is not exact, but only gives an idea how I would approach the problem analytically.

Assume that the true data generating process be given by:
$$
y\_i = \beta\_0 - \beta\_1 x\_i + \varepsilon\_i.
$$
Where, as usual, $E(\varepsilon\_i) = 0$ and $E(\varepsilon|x\_i) = 0$. The conditional mean function is then equal to:
$$
E(y\_i|x\_i) = \beta\_0 - \beta\_1 x\_i + E(\varepsilon\_i|x\_i) = \beta\_0 - \beta\_1 x\_i.
$$

Now let $z\_i$ be the random variable equal to 1 iff observation $i$ is not truncated, i.e. when
$$
\beta\_0 - \beta\_1 x\_i + \varepsilon\_i < Y^A.
$$
If $i$ is not observed, i.e. truncated, we have $z\_i = 0$.

Then the observed conditional mean equals:
$$
E(y\_i|x\_i,z\_i=1) = \beta\_0 - \beta\_1 x\_i + E(\varepsilon\_i|x\_i, z\_i = 1).
$$
The last term is given by:
$$
E(\varepsilon\_i|x\_i, z\_i = 1) = E(\varepsilon\_i|x\_i, \varepsilon\_i < Y^A - \beta\_0 + \beta\_1 x\_i)
$$
This last term, which is a function of $x\_i$ is negative (as $\varepsilon\_i$ is truncated from above and the mean of the untrunctated $\varepsilon$ is zero). Define:
$$
E(\varepsilon\_i|x\_i,\varepsilon\_i < Y^A - \alpha\_0 + \alpha\_1 x\_i) = g(x\_i).
$$
we have that $g(x\_i) < 0$ and in general, we would expect that $g'(x\_i) > 0$, because the restriction is less binding if $x\_i$ becomes bigger (This however is probably not always the case, as $g$ depends on the shape of the joint distribution of $\varepsilon\_i$ and $x\_i$.)

Then we have:
$$
E(y\_i|x\_i, z\_i = 1) = \alpha\_0 + \beta\_1 x\_i + g(x\_i),
$$
This is the blue curve in the picture.
The slope of this line equals:
$$
\frac{\partial E(y\_i|x\_i, z\_i = 1)}{\partial x\_i} = -\beta\_1 + g'(x\_i)
$$
The right hand side of the first equation is bigger than $-\beta\_1$ (so the slope is flatter).

Notice that in general, the conditional mean will alsono longer be a linear function of $x\_i$, so there will also be a specification bias. This also makes it not trivial to determine what exactly the bias will be from fitting a linear function.

Lowering the value of $Y^A$ will lead to a larger bias (more negative $g(x\_i)$) and probably also to a flatter slope of the estimated regression. I hope this is intuitive from the picture above.

> **Comments:**
> **username_0**: Well written, after it was mentioned it was not powers, I was able to deduce this but the graphs you provided really show it properly.  

---

