<p>For individual <span class="math-container">$i$</span>, let <span class="math-container">$Y_i$</span> and <span class="math-container">$X_i$</span> be the relevant variables and let <span class="math-container">$D_i$</span> be the dummy for agricultural sector: 1 if in agriculture and 0 if not.</p>
<p>Then you can run the following regression:
<span class="math-container">$$
Y_i = \alpha_0 + \alpha_1 D_i + \beta_0 X_i + \beta_1 X_i\times D_i + \varepsilon_i.
$$</span>
Assume that <span class="math-container">$\mathbb{E}[\varepsilon_i|D_i, X_i] = 0$</span>.</p>
<p>Then if a person is not employed in agriculture, we have:
<span class="math-container">$$
\mathbb{E}[Y_i|X_i = x, D_i = 0] = \alpha_0 + \beta_0 x.
$$</span>
On the other hand for a person employed in agriculture, you obtain:
<span class="math-container">$$
\mathbb{E}[Y_i |X_i = x, D_i = 1] = (\alpha_0 + \alpha_1) + (\beta_0 + \beta_1) x.
$$</span></p>
<p>So you only need to create one dummy. The value of <span class="math-container">$\alpha_1$</span> give the difference in agriculture and non-agriculture employment when <span class="math-container">$x = 0$</span>. The value of <span class="math-container">$\beta_1$</span> gives the difference in the marginal effect of <span class="math-container">$X$</span> on <span class="math-container">$Y$</span> between agriculture and non-agriculture.</p>

CC BY-SA 4.0
2021-05-21T06:53:24.550Z
2021-05-21T06:53:24.550Z
tdm
<p>I want to test the impact of X on Y. The dependent variable Y is being employed. Now, I want to see if the impact of X is different for those employed in agriculture (A) and non-agriculture (N) sectors. What is the right model to do this?</p>
<p>Do I need to include some interactions?</p>
<p>Or should I define separate dependent variables for A and N? How do I define those variables? Which one of the following:
1- Create a dummy variable for group A (N) which takes value 0 for group N (A) and also not-working group
2- Create a dummy variable for group A (N) which takes value 0 for group N (A) and drop the observation for not-working group
3- Create a dummy variable for group A (N) which takes value 0 for not-working group and drop the observation for group N (A)</p>

<regression>
Suggested model for dependent variable of different groups
D_B
# Suggested model for dependent variable of different groups

(Asked by: username_0 on 2021-05-16)

I want to test the impact of X on Y. The dependent variable Y is being employed. Now, I want to see if the impact of X is different for those employed in agriculture (A) and non-agriculture (N) sectors. What is the right model to do this?

Do I need to include some interactions?

Or should I define separate dependent variables for A and N? How do I define those variables? Which one of the following:
1- Create a dummy variable for group A (N) which takes value 0 for group N (A) and also not-working group
2- Create a dummy variable for group A (N) which takes value 0 for group N (A) and drop the observation for not-working group
3- Create a dummy variable for group A (N) which takes value 0 for not-working group and drop the observation for group N (A)

**Tags:** regression


---

## 1 answers

### Answer by username_1 on 2021-05-21. Score: 4 | Accepted answer

For individual $i$, let $Y\_i$ and $X\_i$ be the relevant variables and let $D\_i$ be the dummy for agricultural sector: 1 if in agriculture and 0 if not.

Then you can run the following regression:
$$
Y\_i = \alpha\_0 + \alpha\_1 D\_i + \beta\_0 X\_i + \beta\_1 X\_i\times D\_i + \varepsilon\_i.
$$
Assume that $\mathbb{E}[\varepsilon\_i|D\_i, X\_i] = 0$.

Then if a person is not employed in agriculture, we have:
$$
\mathbb{E}[Y\_i|X\_i = x, D\_i = 0] = \alpha\_0 + \beta\_0 x.
$$
On the other hand for a person employed in agriculture, you obtain:
$$
\mathbb{E}[Y\_i |X\_i = x, D\_i = 1] = (\alpha\_0 + \alpha\_1) + (\beta\_0 + \beta\_1) x.
$$

So you only need to create one dummy. The value of $\alpha\_1$ give the difference in agriculture and non-agriculture employment when $x = 0$. The value of $\beta\_1$ gives the difference in the marginal effect of $X$ on $Y$ between agriculture and non-agriculture.


---

