This was one of the question in my test which I was not able to attempt.
Question:
Let $\left\{ \left. \left(x_{i,1}, x_{i,2}, \ldots, x_{i,d}, y_i\right) \; \right\rvert \; i = 1, \ldots, n \right\}$ be a multivariate sample and furthermore assume each observation belongs to one of $k$ possible categories.
Consider the two following methods to model the data:
i) Fit a separate linear model to the data in each category using the LSEs.
ii) Fit an interaction model to all the data using the LSEs.
Show that for a fixed category, methods (i) and (ii) will yield the same estimate of the least squares regression equation for that category.
If anyone could provide some guidelines on how to solve this, it will be appreciated.
Thanks.