I have a question where I am not sure about the answer:
A linear model has the following characteristics:
*A dependent variable ($y$)
*One continuous variable ($x_l$), including a quadratic term ($x_1^2$)
*One categorical ($d$ with 3 levels) predictor variable and an interaction term ($d \times x_1$)
How many parameters, including the intercept, are associated with this model?
So I thought about: $y=\beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \beta_3 d$ + $\beta_4dx_1$
I thought I need 5 parameters for this model, but I was told the answer would be 7. So I guess I did the interaction wrong. So it seems to me I have to model each level of d with x1 with a single interaction. But how would I write this down and why do I need this?