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