Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If this is a duplicate question, please point to the right way, but the similar questions I've found here haven't been sufficiently similar. Suppose I estimate the model $$Y=\alpha + \beta X + u$$

and find that $\beta>0$. However, it turns out that $X=X_1+X_2$, and I suspect $\partial Y/\partial X_1 \ne \partial Y / \partial X_2$, and in particular, that $\partial Y/\partial X_1 > \partial Y / \partial X_2$. So I estimate the model $$Y=\alpha + \beta_1 X_1 + \beta_2 X_2 +u$$and find significant evidence for $\beta_1,\beta_2>0$. How can I then test whether $\beta_1> \beta_2$? I considered running another regression $$Y=\alpha +\gamma(X_1 - X_2) + u$$ And testing whether $\gamma>0$. Is this the best way?

Also, I need to generalize the answer to many variables, i.e. suppose we have $$Y=\alpha + \beta^1 X^1 + \beta ^2 X^2 + \dots + \beta^nX^n + u$$ where for each $j=1,\dots,n$, $X^j=X_1^j+X_2^j$, and I would like to test for each $j$ whether $\partial Y/\partial X_1^j \ne \partial Y / \partial X_2^j$.

By the way, I am primarily working in R.

share|improve this question
up vote 12 down vote accepted

Is this the best way?

No, that won't actually do what you want.

Let $\gamma = \beta_1 - \beta_2$.

$\beta_1 X_1 + \beta_2 X_2 = (\gamma+\beta_2) X_1 + \beta_2 X_2 = \gamma X_1 + \beta_2 (X_1 + X_2)$.

Hence the model $Y=\alpha + \beta_1 X_1 + \beta_2 X_2 +u$ becomes $Y=\alpha + \gamma X_1 + \beta_2 (X_1 +X_2) +u$

So you supply predictors $X_1$ and $X_3=X_1+X_2$, and then you can perform a straight hypothesis test of whether $\gamma>0$ (against the null of equality).

share|improve this answer
Perfect, thank you very much. – crf Apr 13 '14 at 0:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.