Compare coefficients of two independent variable from two regressions models with the same dependent variable I have the two following regression:
$$y=X_1\beta_1+\varepsilon_1$$
and
$$y=X_2\beta_2+\varepsilon_2$$
$x_1$ and $x_2$ are indicator variables and very similar. One expert claim that the two coefficients are the same. I want to know what kind of test I can perform to see if $β_1=β_2$.
 A: If the two predictors are orthogonal, an optimal test is to compare the model 
$$ y_i \sim \beta_0 + \beta_1 X_1 + \beta_2 X_2  $$ 
with the submodel
$$ y_i \sim \beta_0 + \beta_1 (X_1 + X_2)  $$ 
with the likelihood ratio test. The null hypothesis is that $\beta_1 = \beta_2$. 
A: You are analyzing a single model $y=X\beta+\varepsilon$.  The regression model will return $y=\beta_0+X_1\beta_1$ with $\beta_0$ being the intercept.  To determine the difference between the two models you need to look at both the slope $\beta_1$ and the intercept $\beta_0$.  You can use the indicator variable as a regressor by itself and in combination with your other independent variables.  If the indicator variable is $d$ it will be $d=0$ for the $X_1$s you include above and $d=1$ for the $X_2$s.  The model becomes $y\sim d, X, (X*d)$.  The regression will return $y=\beta_0+\beta_1X+\beta_2d+\beta_3Xd$.  When $d=0$ the coefficients $\beta_2$ and $\beta_3$ vanish.  When $d=1$ the intercept is $(\beta_0+\beta_2)$ and the slope is $(\beta_1+\beta_3)X$.  Keep the $\beta$s with significant p-values and you end up with a model that tells exactly what and where is the difference between the two groups.  See Ways of comparing linear regression interepts and slopes?.
