0

I run the following regressions:

Y_1 ~ c_1 + b_1*X
Y_2 ~ c_2 + b_2*X

and I get two estimates for b_1 and b_2. What is the appropiate statistic to test if b_1 <= b_2 and is there a function for that in R?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
LyxUser12345
  • 111
  • 2
  • It seems that the appropriate procedure can be found here: https://stats.stackexchange.com/questions/93540/testing-equality-of-coefficients-from-two-different-regressions – LyxUser12345 Jan 02 '19 at 14:21
  • Do the "$X$" in the two regressions have any data in common? Are the regressions performed using the same technique? In brief, is there any way in which the estimates of the $b_i$ might be statistically related or not? – whuber Jan 02 '19 at 21:30
  • The "$X$" are identical and both are linear regressions, i.e. use OLS. – LyxUser12345 Jan 03 '19 at 16:08
  • Would it be fair to understand this situation as consisting of two replications of the same experiment, then? $X$ would represent the fixed variables and the responses would be the two vectors $Y_1,Y_2.$ – whuber Jan 03 '19 at 16:12
  • Yes, exactly. The hypothesis could be for example: Doing sport in the morning ($X$) leads to a greater effect on productivity in the morning ($Y1$) than in the afternoon ($Y2$), i.e. ($b1 > b2$). – LyxUser12345 Jan 03 '19 at 16:13
  • Is there a reason you are not fitting these data with a single model? You simply would make the morning/afternoon distinction one of the variables in the model matrix. That would reduce your question to testing the afternoon vs. morning effect, which is routine. – whuber Jan 03 '19 at 16:15
  • Thanks, I tried your procedure and implemented it with the systemfit package in R. Here is my code: eq1 – LyxUser12345 Jan 03 '19 at 21:55
  • It's unclear what you might need a package for. Doesn't base `R` accomplish this with `summary(lm(c(Y1,Y2) ~ c(X,X) + factor(rep(0:1, each=length(X)))))`? – whuber Jan 03 '19 at 22:20

0 Answers0