<p>No, </p>

<p>I don't see how the dummy variable you are proposing would give you the same (or even similar) analysis as in the original model. </p>

<p>I would recommend dealing with the endogeneity in another way. IV estimation, or one of the more recent methods, difference-in-difference, matching etc. One of the will be suitable.  </p>

CC BY-SA 4.0
2019-02-15T12:12:58.520Z
Thank you for your answer. Let me explain the issue a bit more. I am more interested in the sign of the coefficient than its magnitute. When I run the regression as I described it, the coefficient is both significant and positive, suggesting that those that have higher rate of inventory cycle actually demand more TC, than those below the average, which is actually the asnwer I wanted to obtain. But before I turn in my paper I want to make sure that it would be, at least in principle, valid use of a dummy variable.
krkc_bhdr
CC BY-SA 4.0
2019-02-15T13:30:24.437Z
So then a positive dummy variable will then tell you that firms above the average will impact Y in a particular way. Is that really what you want to say?
user22485
CC BY-SA 4.0
2019-02-15T11:20:16.737Z
2019-02-15T11:20:16.737Z
user22485
<p>I have a panel data model as following,
<span class="math-container">$$Y_{it}=intercept +B_1X_{it}+B_2Q_{it}+error_{it}$$</span>   </p>

<p>where <span class="math-container">$i$</span> is for firm and <span class="math-container">$t$</span>= time.</p>

<p><span class="math-container">$Y$</span>= trade credit demand, <span class="math-container">$X$</span>= inventory cycle, as inventory moves faster firms demand more trade credit. On the other hand because trade credit means extra inventory, the cycle would be affected by it, too.</p>

<p>I know that the model suffers from endogeneity because <span class="math-container">$Y$</span> affects <span class="math-container">$X$</span> and in return <span class="math-container">$X$</span> affects <span class="math-container">$Y$</span>. Would it be a valid procedure if I tried to work around this issue by assigning a dummy variable and not use <span class="math-container">$X$</span> in the analysis at all by calculating first yearly average for the cycle and assign 1 if a firm is above the average for that year and 0 if below it.  Maybe the code I am using may clarify any vagueness.</p>

<p>in the R code below.</p>

<pre><code>mydata=mydata%&gt;%group_by(year)%&gt;%mutate(mean_x=mean(x)) 
mydata=mydata%&gt;%mutate(Dummy=case_when(X&gt;=mean_x~1, TRUE~0))
</code></pre>

<p>and the model becomes as following:</p>

<p><span class="math-container">$$Y_{it}=intercept+B_1 Dummy+B_2 Q_{it}+error_{it}$$</span></p>

<p>I hope I am clear enough. thanks in advance!</p>

<econometrics><paneldata><endogeneity>
Endogeneity problem with a dummy variable
krkc_bhdr
# Endogeneity problem with a dummy variable

(Asked by: username_0 on 2019-02-14)

I have a panel data model as following,
$$Y_{it}=intercept +B_1X_{it}+B_2Q_{it}+error_{it}$$ 
where $i$ is for firm and $t$= time.
$Y$= trade credit demand, $X$= inventory cycle, as inventory moves faster firms demand more trade credit. On the other hand because trade credit means extra inventory, the cycle would be affected by it, too.
I know that the model suffers from endogeneity because $Y$ affects $X$ and in return $X$ affects $Y$. Would it be a valid procedure if I tried to work around this issue by assigning a dummy variable and not use $X$ in the analysis at all by calculating first yearly average for the cycle and assign 1 if a firm is above the average for that year and 0 if below it.  Maybe the code I am using may clarify any vagueness.
in the R code below.
mydata=mydata%>%group_by(year)%>%mutate(mean_x=mean(x)) 
mydata=mydata%>%mutate(Dummy=case_when(X>=mean_x~1, TRUE~0))

and the model becomes as following:
$$Y_{it}=intercept+B_1 Dummy+B_2 Q_{it}+error_{it}$$
I hope I am clear enough. thanks in advance!

**Tags:** econometrics, paneldata, endogeneity

---

## 1 answers

### Answer by username_1 on 2019-02-15. Score: 1

No,

I don't see how the dummy variable you are proposing would give you the same (or even similar) analysis as in the original model.

I would recommend dealing with the endogeneity in another way. IV estimation, or one of the more recent methods, difference-in-difference, matching etc. One of the will be suitable.

> **Comments:**
> **username_0**: Thank you for your answer. Let me explain the issue a bit more. I am more interested in the sign of the coefficient than its magnitute. When I run the regression as I described it, the coefficient is both significant and positive, suggesting that those that have higher rate of inventory cycle actually demand more TC, than those below the average, which is actually the asnwer I wanted to obtain. But before I turn in my paper I want to make sure that it would be, at least in principle, valid use of a dummy variable.  
> **username_1**: So then a positive dummy variable will then tell you that firms above the average will impact Y in a particular way. Is that really what you want to say?  

---

