Retrieving standard deviations from OLS estimates I am running a fixed effects regression in Stata: $y=\alpha+\beta D$ (omitting the FE), where $D$ is a dummy variable. Basically, I want the mean of group $D=0$ and of group $D=1$ after controlling for time invariant heterogeneity via fixed effects, along with their standard deviations. Stata reports coefficients and standard errors.
Now, the means after FE are simply $E[Y|D=0]=\alpha$ and $E[Y|D=1]=\alpha+\beta$, because the intercept in Stata fixed effects regression is just the mean. But how do I get the standard deviations? Groups may not have the same number of observations.
If I had just one group, I would estimate $Y=\alpha$, and from the standard error of the intercept I can calculate the sd with $SD=SE*\sqrt{n}$, where $n$ is the number of observations. But that doesn't seem to work with two groups and the dummy. I tested with a standard OLS (without fixed effects) and, say, the SD of group $D=0$ cannot be computed via $SD_0=SE(\alpha)\sqrt{n_0}$ (a degrees of freedom correction of 2 doesn't change much).
So how can I do it, get the SD of "FE corrected" means?
 A: I'm not sure whether you want the standard deviation of $Y$ separately for the $d=1$ and $d=0$ groups or if you want the standard error of the estimate of the mean of $Y$ separately in the $d=1$ and $d=0$ groups.
If you want the former (the standard deviation of $Y$ separately in the two groups), then linear regression is not the right tool.  By default, the linear regression model assumes that this standard deviation is equal in the two groups (the homoskedasticity assumption).  You can read off this common standard deviation from stata's regression output---it is called "Root MSE."  If you don't want to assume that the standard deviation of $Y$ is the same in the two groups and if these separate means and separate standard deviations are actually what you want, then you should just calculate them using the summary command, like:
#version 8.2
#delimit ;
sysuse auto;           * price is continuous Y variable, foreign is a dummy variable;
bys foreign: sum price;

On the other hand, if you want the latter (an estimate of the mean $Y$ in each group and the standard errors of these estimates), then the function is lincom:
#version 8.2
#delimit ;
sysuse auto;           * price is continuous Y variable, foreign is a dummy variable;
reg price foreign;
lincom _cons;          * estimate avg price, std dev, 95% CI for foreign=0 group;
lincom _cons+foreign;  * estimate avg price, std dev, 95% CI for foreign=1 group; 

The code is for an old version of stata because that's what I have at home.  However, it should work turn-key in newer versions as well.
