# How to compare whether the coefficients of two independent variables statistically different from each other?

If I have two independent variables and they are dummy variable along with other independent variables and I run a linear probability model, I want to compare whether the coefficients of two dummy variables are statistically different from each other. I do not know how to compare that. Could someone help me on that?

• Hint: think through the statistical procedure to determine statistical significance of coefficients. What is the coefficient estimate compared against?
– Sycorax
Apr 17, 2014 at 2:30
• what statistical procedure are you referring to do you mean the z statistic is coefficient divided by its standard error? Apr 17, 2014 at 2:36
• Sorry - that was a bit too elliptical. The test that you're looking for is the Wald test (stats.stackexchange.com/questions/92912/…). Usually, you compare the coefficient estimate to zero... But not in this case.
– Sycorax
Apr 17, 2014 at 2:42
• The Wald test seems to be used for one variable for it parameter and the proposed value at least based on wiki...but I have to compare two DIFFERENT dummy variables though... Apr 17, 2014 at 2:47
• An alternative to the answer you have is by reparameterization of the model into parameter and difference of the two, by suppling the basline dummy and the sum of the two dummies. and a direct test of the coefficient for the difference. (In fact given the fact that being a dummy makes no difference to the approach, this Q is arguably a duplicate.) Apr 17, 2014 at 3:44

I want to compare whether the coefficients of two dummy variables are statistically different from each other

I understand that you want to test the hypotheses $$H_0: A=B$$ $$H_1: A\not=B$$.

So we are performing inference on the quantity $A-B$ and evaluating whether it is sufficiently far from 0 relative to its standard error. Ordinarily, in the single-parameter case, we just compare, e.g., $A$ to its standard error. But we have two parameters here. So we have $$\sqrt{\frac{(A-B)^2}{\text{var}(A)+\text{var}(B)-2\text{cov}(A,B)}}$$ as our test statistic, where $\text{cov}(A,B)$ is the covaraince of $A$ and $B$. Now we compare the test statistic to a standard normal distribution.

there are two null in mind let say they are A and B...one scenario for null is A + B = 0. second scenario is A*B = 0... Are these the right appraoch?

confuses me, because it suggests that your null hypothesis is not that $H_0:A=B$, but instead that $H_0:A=-B$, or $H_0:A=1/B$. While not typical, this certainly might make sense for your particular research topic.

• Based on what you said, I can set a null A - B = 0 and then use F test and If I can show that they are statistically significant ... it means they are statistically different from each other? Apr 17, 2014 at 3:24
• No, this is still a Wald test. But you have the general idea right: we are testing whether parameter $A$ is different from $B$.
– Sycorax
Apr 17, 2014 at 3:33
• what is the command for Wald test? Apr 17, 2014 at 3:34
• I'm afraid I'm not a STATA user.
– Sycorax
Apr 17, 2014 at 3:34
• The Stata command for a Wald test is test. The last hypothesis $H_0 : A = 1/B$ is a non-linear Wald test, the Stata command for that is testnl. Apr 17, 2014 at 7:19