<p>Notice that:
<span class="math-container">$$
y = \beta_1 x_1 + \beta_2 age + \beta_3 age^2
$$</span>
is a more restrictive model than:
<span class="math-container">$$
y = \delta_1 x_1 + \delta_2 D_{45} + \delta_3 D_{46} + \ldots
$$</span>
where you have a dummy for every age level.</p>
<p>To see this, take for example the case where age is <span class="math-container">$a$</span>. Then the first regression gives:
<span class="math-container">$$
y = \beta_1 x_1 + \beta_2 \times a + \beta_3 \times (a)^2
$$</span>
The second regression gives:
<span class="math-container">$$
y = \delta_1 x_1 + \delta_a.
$$</span>
where <span class="math-container">$\delta_a$</span> is the coefficient of the dummy <span class="math-container">$D_a$</span>.</p>
<p>So for <span class="math-container">$\delta_1 = \beta_1$</span> and <span class="math-container">$\delta_a = \beta_2 \times a + \beta_3 \times (a)^2$</span> the two are the same.</p>
<p>This means that the first regression is a special case of the second one where we specify <span class="math-container">$\delta_1 = \beta_1$</span> and <span class="math-container">$\delta_a = \beta_2 a + \beta_3 a^2$</span>.</p>
<p>Given that the first regression is a restrictive version of the second one, in principle, you could test for the fit of the first model versus the second model using something like a likelihood ratio test <a href="https://en.wikipedia.org/wiki/Likelihood-ratio_test" rel="nofollow noreferrer">wiki</a>.</p>

CC BY-SA 4.0
2021-11-16T00:48:13.713Z
I have a hard time seeing how the first model appears as a result of a parameter restriction of the second. The page on wiki you refer to explicitly has $\Theta_0$ being a subset of $\Theta$. It could be just me but I can only see $\beta_1$ being common. You could set up the more general model including both $x_1$, age terms, and dummies and test whether the dummies can be excluded. If that is the case, however, you could probably also exclude the age terms from the full model (since the dummy model is more flexible) and the choice of the model with age terms would then depend on simplicity.
Jesper Hybel
CC BY-SA 4.0
2021-11-16T00:48:55.150Z
From my point of view this would suggest a comparison based on information criteria. But maybe I am missing something?
Jesper Hybel
CC BY-SA 4.0
2021-11-16T08:27:15.537Z
Sorry, why is the one model more restrictive than the other? I thought more variables means more restrictions?
Zebraboard
CC BY-SA 4.0
2021-11-17T07:11:54.120Z
@Jesper Hybel: I tried to give more info for why the first model is a special case of the second one. In general if you have a discrete number of values for the covariates (like age) then creating a dummy for each value gives a fully non-parametric specification.
tdm
CC BY-SA 4.0
2021-11-17T11:45:11.547Z
@tdm That makes sense. I completely overlooked that there was a dummy for each year.
Jesper Hybel
CC BY-SA 4.0
2021-11-15T14:59:11.497Z
2021-11-17T07:09:36.660Z
2021-11-17T07:09:36.660Z
tdm
<p>Tried asking this on Math Stack Exchange. Got no answer after a week, so trying here.</p>
<p>I had this question in an exam lately and I was not sure how to answer it. Now the exam is done, and I can't go back, but it's been in my head ever since and I'm really curious about the answer.</p>
<p><strong>Suppose you have a data set, with variables:</strong></p>
<p><span class="math-container">$age$</span>: A persons age</p>
<p><span class="math-container">$age^2$</span>: age to the power of 2</p>
<p>And dummy variables: <span class="math-container">$D45 = (age=45)$</span>, <span class="math-container">$D46 = (age=46)$</span> ... <span class="math-container">$D55 = (age=55)$</span> etc.</p>
<p><strong>And suppose you have two models, where</strong></p>
<p><span class="math-container">$$
y = \beta_1 x_1 + \beta_2 age + \beta_3 age^2 
$$</span>
and
<span class="math-container">$$
y = \beta_1 x_1 + \beta_2 D_{45} + \beta_3 D_{46} ... \beta_{22} D_{65}
$$</span></p>
<p><strong>How would you guys test which of the functional forms in the two models best explains the data?</strong></p>
<p>I suppose we are to test <span class="math-container">$\beta_i = 0$</span> for both models. But I am not sure.</p>
<p>What would you guys have done in this situation?</p>
<p>Kind regards</p>

CC BY-SA 4.0
2021-11-15T11:44:58.873Z
Hi @Zebraboard. There are potentially other methods, but have a look at the Ramsey RESET.
EB3112
<econometrics><regression>
Test which functional form that best explains data
Zebraboard
# Test which functional form that best explains data

(Asked by: username_0 on 2021-11-15)

Tried asking this on Math Stack Exchange. Got no answer after a week, so trying here.

I had this question in an exam lately and I was not sure how to answer it. Now the exam is done, and I can't go back, but it's been in my head ever since and I'm really curious about the answer.

**Suppose you have a data set, with variables:**

$age$: A persons age

$age^2$: age to the power of 2

And dummy variables: $D45 = (age=45)$, $D46 = (age=46)$ ... $D55 = (age=55)$ etc.

**And suppose you have two models, where**

$$
y = \beta\_1 x\_1 + \beta\_2 age + \beta\_3 age^2
$$
and
$$
y = \beta\_1 x\_1 + \beta\_2 D\_{45} + \beta\_3 D\_{46} ... \beta\_{22} D\_{65}
$$

**How would you guys test which of the functional forms in the two models best explains the data?**

I suppose we are to test $\beta\_i = 0$ for both models. But I am not sure.

What would you guys have done in this situation?

Kind regards

**Tags:** econometrics, regression
> **Comments:**
> **username_1**: Hi @Zebraboard. There are potentially other methods, but have a look at the Ramsey RESET.  

---

## 1 answers

### Answer by username_2 on 2021-11-15. Score: 5 | Accepted answer

Notice that:
$$
y = \beta\_1 x\_1 + \beta\_2 age + \beta\_3 age^2
$$
is a more restrictive model than:
$$
y = \delta\_1 x\_1 + \delta\_2 D\_{45} + \delta\_3 D\_{46} + \ldots
$$
where you have a dummy for every age level.

To see this, take for example the case where age is $a$. Then the first regression gives:
$$
y = \beta\_1 x\_1 + \beta\_2 \times a + \beta\_3 \times (a)^2
$$
The second regression gives:
$$
y = \delta\_1 x\_1 + \delta\_a.
$$
where $\delta\_a$ is the coefficient of the dummy $D\_a$.

So for $\delta\_1 = \beta\_1$ and $\delta\_a = \beta\_2 \times a + \beta\_3 \times (a)^2$ the two are the same.

This means that the first regression is a special case of the second one where we specify $\delta\_1 = \beta\_1$ and $\delta\_a = \beta\_2 a + \beta\_3 a^2$.

Given that the first regression is a restrictive version of the second one, in principle, you could test for the fit of the first model versus the second model using something like a likelihood ratio test [wiki](https://en.wikipedia.org/wiki/Likelihood-ratio_test).

> **Comments:**
> **username_3**: I have a hard time seeing how the first model appears as a result of a parameter restriction of the second. The page on wiki you refer to explicitly has $\Theta_0$ being a subset of $\Theta$. It could be just me but I can only see $\beta_1$ being common. You could set up the more general model including both $x_1$, age terms, and dummies and test whether the dummies can be excluded. If that is the case, however, you could probably also exclude the age terms from the full model (since the dummy model is more flexible) and the choice of the model with age terms would then depend on simplicity.  
> **username_3**: From my point of view this would suggest a comparison based on information criteria. But maybe I am missing something?  
> **username_0**: Sorry, why is the one model more restrictive than the other? I thought more variables means more restrictions?  
> **username_2**: @Jesper Hybel: I tried to give more info for why the first model is a special case of the second one. In general if you have a discrete number of values for the covariates (like age) then creating a dummy for each value gives a fully non-parametric specification.  
> **username_3**: @tdm That makes sense. I completely overlooked that there was a dummy for each year.  

---

