# Fixed Effects regression, but different slopes within each group. How does regression estimate the slope?

If I am running a regression of the following form:

$$y_{i,t} = \mu_i + \beta_1x_{i,t} + \epsilon_{i,t}$$

Where i indicates group, t time, and $$\mu_i$$ are a set of fixed effects for each group, and x is my independent variable of interest.

Say I estimate this model to control for time invariant characteristics. Now, if within each i, the slopes of x and y are different, what exactly does regression (Ordinary Least Squares) estimate when not accounting for different slopes within groups? Does it somehow take an average of the group specific slopes?

Just as a very simplified example if it helps to explain my confusion, I drew fake datapoints for two groups (one in red, one in blue). Fitting the fixed effects allows for the groups to have their own intercepts, but what line will regression ultimately draw?

• Your model involves only a single slope, $\beta_1,$ whence it would be impossible for OLS to "spit out [a] specific slope" for each group. You need to include group membership in the explanatory variables and you also need to interact it with $x.$ As you might imagine, this is a common situation -- it's an example of "Analysis of Covariance" (ANCOVA), and indeed you can find thousands of examples here on CV.
– whuber
Commented Mar 10, 2023 at 20:50
• Yes, I understand that this is one slope. My question is specifically what exactly is it estimating in this case? How would the estimate of $\beta_1$ form given that there are different within group slopes? does it just average them into one number? etc. I can edit the question to make it more clear what I am asking Commented Mar 10, 2023 at 20:58