Can ecological inference problems be solved by fixed effects? The Ecological inference problem is about drawing inferences on the individual level using aggregate data. The main problems is confounding and aggregation bias. One method to solve the ecological inference problem is by using the ecologic regression approach. Ecological regression builds on the constance assumption, by which is meant that the behavior of individuals does not vary systematically across units. This assumption is not realistic in many instances. 
Can the constance assumption be strengthened by conducting a panel data regression including fixed effects for the units themselves and for the time periods? 
 A: Nope. I like to think of ecological inference as creating confounds between contextual (and spatial) effects and individual level effects (in Sociological speak). So consider a set of equations at the individual level:
$$y_1 = \beta_1(x_1) + \beta_2(\bar{X})$$
$$y_2 = \beta_1(x_2) + \beta_2(\bar{X})$$
Where $y_1$ and $x_1$ are individual level characteristics, and $\bar{X} = \frac{x_1 + x_2}{2}$ (so $\beta_2$ may be considered a contextual effect). If you aggregate (i.e. add the two individual level equations together) you get:
$$(y_1 + y_2) = \beta_1(x_1 + x_2) +  2 \cdot \beta_2(\bar{X})$$
Then dividing by two you have an equation for the group means:
$$\frac{y_1 + y_2}{2} = \beta_1(\frac{x_1 + x_2}{2}) +  \frac{2 \cdot \beta_2(\bar{X})}{2}$$
$$\bar{Y} = \beta_1(\bar{X}) +  \beta_2(\bar{X})$$
Here you can see that you can't uniquely identify $\beta_1$ (the individual level effect) and $\beta_2$ (the contextual aggregate effect). All you can estimate is their combined effects, $(\beta_1 + \beta_2)$. So what exactly do fixed effects do? Lets start with our initial individual level equation and instead of an observed contextual effect, lets say we know a contextual effect exists but can't observe it, $\bar{Z}$.
$$y_1 = \beta_1(x_1) + \beta_2(\bar{Z})$$
$$y_2 = \beta_1(x_2) + \beta_2(\bar{Z})$$
Using the same logic as before, we can estimate a group mean equation:
$$\bar{Y} = \beta_1(\bar{X}) +  \beta_2(\bar{Z})$$
Now here the magic happens, we can subtract out the group mean equation from the individual level equation, and cancel out the unobserved contextual effect of $\beta_2(\bar{Z})$:
$$y_i - \bar{Y} = \beta_1(x_i - \bar{X}) + \beta_2(\bar{Z} - \bar{Z})$$
So to sum up; with the individual level equation fixed group effects can control for all unobserved group level effects. They can not however undue confounds created from aggregation to begin with.
