<p>Yes it is "allowed". Econometrically it is not a problem. The real question is how useful such a model is for your setting and that will depend on your exact research question, variables and data.</p>

CC BY-SA 4.0
2020-01-08T22:23:01.517Z
2020-01-08T22:23:01.517Z
BB King
<p>It is allowed in a sense it does not violate any assumption of the OLS estimator but it is also unlikely that you would need such a specification for a model.</p>

<p>If you include <span class="math-container">$log(x_2)$</span> in model specification that means you are trying to control for the fact that there is some exponential relationship between <span class="math-container">$y$</span> and <span class="math-container">$x$</span> like <span class="math-container">$y=x^b$</span> and taking logs of <span class="math-container">$x^b$</span> linearizes it since <span class="math-container">$log(x^b)=blog(x)$</span>. Or theory might suggest there is some multiplicative relationship between variables like standard monetary model <span class="math-container">$P=MV/Y$</span> so you take log of both sides to linearize it <span class="math-container">$log(P)=log(M) + log(V) - log(Y)$</span> and then estimate the above equation with OLS.</p>

<p>When you are adding quadratic terms then you are in essence actually fitting quadratic curve instead of line to the model. In such case you should be sure that the relationship is quadratic <span class="math-container">$y=bx_3^2$</span></p>

<p>Now, in principle nothing prohibits you from using both of them but if you are already log linearizing one term then why would you not log linearize also the second, since log will get rid of that square term and you save one degree of freedom which you would otherwise have to sacrifice due to having 2 coefficients for <span class="math-container">$x_3$</span> in that case. Moreover, if you use logs to get rid of multiplicative relationship to be able to estimate all variables separately (which is actually quite often the case) then there would again not be any need for adding quadratic terms since everything is already linearized. </p>

<p>This being said I can imagine a situation where you would know that the <span class="math-container">$x_3$</span> is for sure quadratic so the model from above example gives you better fit and then you could actually use it.</p>

<p>So to sum it up while there is nothing inherently wrong with such model usually when you already linearizing exponential variables with logs there is not much reason to switch doing that unless you are quite sure that the <span class="math-container">$y$</span> and <span class="math-container">$x_3$</span> have quadratic relationship which is just unlikely. Also even in cases where there is quadratic relationship people might still prefer to use just logs everywhere to save that degree of freedom - especially when you can’t afford having more than just few hundred data points this can be really important. Hence you might observe only few models that actually mix these.</p>

<p>One example where I saw something similar to your example is the Mincer equation estimation. For example in <a href="https://www.ssoar.info/ssoar/bitstream/handle/document/25629/ssoar-appecon-2010-16-andini-a_dynamic_mincer_equation_with.pdf?sequence=1&amp;isAllowed=y&amp;lnkname=ssoar-appecon-2010-16-andini-a_dynamic_mincer_equation_with.pdf" rel="nofollow noreferrer">this</a> paper the dynamic Mincer equation is estimated as:</p>

<p><span class="math-container">$$ln(w_{it} )= v_{10} + v_{20}ln(w_{t-1} )+
v_{30}s_i +v_{40}z_{it} + v_{50}z^2_{it} + u_{it}$$</span></p>

CC BY-SA 4.0
2020-01-09T11:05:32.743Z
I don't understand when you say that "log will get rid of that square term".  Does it mean that the use of the logarithm transformation should be sufficient relative to the inclusion of quadratic specification even if it aims to capture the change of effect sign for the sake of the degree of freedom.  In the case where my sample is large enough (>5000) is the degree of freedom a real issue if I estimate less than 100 variables for example.    Moreover, i was wondering what's best specification when we try to represent an increasing effect reaching a plateau.  Thank you !
Barry
CC BY-SA 4.0
2020-01-09T11:09:42.607Z
@Barry yes log. transformation of x variable is sufficient to control for quadratic (or any exponential) relationship. Well a rule of thumb when it comes to degrees of freedoms is that they should be such that you have at least 30 observations per any loss of degree of freedom (that is for any independent variable). But the more observations the higher the power. If you have 5000 observations and 100 variables you are technically safe but I personally would still worry a bit about having just 50obs per 1 independent variable. But with 5000 obs and 10 variables that would not be a huge concern
1muflon1
CC BY-SA 4.0
2020-01-08T22:46:07.990Z
2020-01-08T23:06:55.163Z
2020-01-08T23:06:55.163Z
1muflon1
<p>Is it allowed to include logarithm and polynomial tranformations in the same econometric model.
For instance :
<span class="math-container">$$Y = x_1 + \log(x_2) + x_3 + x_3^2$$</span></p>

<p>I didn't find any interdiction however it seems to be not used in practise.</p>

<p>Thank you !</p>

CC BY-SA 4.0
2020-01-08T22:23:01.017Z
It's your model, so you can do whatever you want with it. Best if you have an explanation/reasoning of why you think $y$ should be related to $x$'s in such a way.
Art
<econometrics>
Can logarithm and polynomial transformation be included in the same equation
Barry
# Can logarithm and polynomial transformation be included in the same equation

(Asked by: username_0 on 2020-01-08)

Is it allowed to include logarithm and polynomial tranformations in the same econometric model.
For instance :
$$Y = x\_1 + \log(x\_2) + x\_3 + x\_3^2$$

I didn't find any interdiction however it seems to be not used in practise.

Thank you !

**Tags:** econometrics

> **Comments:**
> **username_1**: It's your model, so you can do whatever you want with it. Best if you have an explanation/reasoning of why you think $y$ should be related to $x$'s in such a way.  

---

## 2 answers

### Answer by username_2 on 2020-01-08. Score: 4

Yes it is "allowed". Econometrically it is not a problem. The real question is how useful such a model is for your setting and that will depend on your exact research question, variables and data.


---

### Answer by username_3 on 2020-01-08. Score: 1

It is allowed in a sense it does not violate any assumption of the OLS estimator but it is also unlikely that you would need such a specification for a model.

If you include $log(x\_2)$ in model specification that means you are trying to control for the fact that there is some exponential relationship between $y$ and $x$ like $y=x^b$ and taking logs of $x^b$ linearizes it since $log(x^b)=blog(x)$. Or theory might suggest there is some multiplicative relationship between variables like standard monetary model $P=MV/Y$ so you take log of both sides to linearize it $log(P)=log(M) + log(V) - log(Y)$ and then estimate the above equation with OLS.

When you are adding quadratic terms then you are in essence actually fitting quadratic curve instead of line to the model. In such case you should be sure that the relationship is quadratic $y=bx\_3^2$

Now, in principle nothing prohibits you from using both of them but if you are already log linearizing one term then why would you not log linearize also the second, since log will get rid of that square term and you save one degree of freedom which you would otherwise have to sacrifice due to having 2 coefficients for $x\_3$ in that case. Moreover, if you use logs to get rid of multiplicative relationship to be able to estimate all variables separately (which is actually quite often the case) then there would again not be any need for adding quadratic terms since everything is already linearized.

This being said I can imagine a situation where you would know that the $x\_3$ is for sure quadratic so the model from above example gives you better fit and then you could actually use it.

So to sum it up while there is nothing inherently wrong with such model usually when you already linearizing exponential variables with logs there is not much reason to switch doing that unless you are quite sure that the $y$ and $x\_3$ have quadratic relationship which is just unlikely. Also even in cases where there is quadratic relationship people might still prefer to use just logs everywhere to save that degree of freedom - especially when you can’t afford having more than just few hundred data points this can be really important. Hence you might observe only few models that actually mix these.

One example where I saw something similar to your example is the Mincer equation estimation. For example in [this](https://www.ssoar.info/ssoar/bitstream/handle/document/25629/ssoar-appecon-2010-16-andini-a_dynamic_mincer_equation_with.pdf?sequence=1&isAllowed=y&lnkname=ssoar-appecon-2010-16-andini-a_dynamic_mincer_equation_with.pdf) paper the dynamic Mincer equation is estimated as:

$$ln(w\_{it} )= v\_{10} + v\_{20}ln(w\_{t-1} )+
v\_{30}s\_i +v\_{40}z\_{it} + v\_{50}z^2\_{it} + u\_{it}$$

> **Comments:**
> **username_0**: I don't understand when you say that "log will get rid of that square term".  Does it mean that the use of the logarithm transformation should be sufficient relative to the inclusion of quadratic specification even if it aims to capture the change of effect sign for the sake of the degree of freedom.  In the case where my sample is large enough (>5000) is the degree of freedom a real issue if I estimate less than 100 variables for example.    Moreover, i was wondering what's best specification when we try to represent an increasing effect reaching a plateau.  Thank you !  
> **username_3**: @username_0 yes log. transformation of x variable is sufficient to control for quadratic (or any exponential) relationship. Well a rule of thumb when it comes to degrees of freedoms is that they should be such that you have at least 30 observations per any loss of degree of freedom (that is for any independent variable). But the more observations the higher the power. If you have 5000 observations and 100 variables you are technically safe but I personally would still worry a bit about having just 50obs per 1 independent variable. But with 5000 obs and 10 variables that would not be a huge concern  

---

