How do you calculate a confidence interval for the difference between 2 dummy variables? I think I understand how to calculate the confidence interval for the difference in means of 2 groups when there's one dummy variable. You just add or substract 1.96 x (the standard error of the dummy coefficient) to the value of the dummy coefficient, eg b1 +- 1.96 x SE(b1) for a 95% confidence intercal. However as I understand it this only works when one of the groups you want to compare is a reference group (and doesn't have its own dummy variable). What if instead you want a confidence interval of the difference in means between 2 groups, both of which have a dummy? Say the regression is b0 + b1 x X1 + b2 x X2, with both X1 and X2 dummy variables. How do you find the confidence interval of the difference in means between X1 and X2?

Sextus Empiricus' answer is of course correct, but there is a simpler way to do it.
Consider the original equation:
$$y_i = \beta_0 + \beta_1 x_{1i} + \beta_2 x_{2i} + e_i$$
If $\beta_1 = \beta_2$. then this equation can be reduced to:
$$y_i = \beta_0 + \beta_1 (x_{1i} + x_{2i}) + e_i$$
Now we add another term $\gamma x_{2i}$ to the equation:
$$y_i = \beta_0 + \beta_1 (x_{1i} + x_{2i}) + \gamma x_{2i} + e_i$$
We can rearrange terms to get:
$$y_i = \beta_0 + \beta_1 x_{1i} + (\beta_1 + \gamma) x_{2i} + e_i$$
and by comparing with the original expression we see that $\beta_2 = \beta_1 + \gamma$, or, alternatively, $\gamma = \beta_2 - \beta_1$. This is what you want to estimate.
Consequently, estimating the parameters of:
$$y_i = \beta_0 + \beta_1 z_i + \gamma x_{2i} + e_i, \,\,z_i = x_{1i} + x_{2i} $$
allows us to test $\beta_2 - \beta_1 = 0$ by testing the equivalent $\gamma = 0$ using the standard results displayed by regression packages, and similarly for constructing confidence intervals.
