I have the regression statistics for the same regression run on two different samples, and am asked to explain whether it is possible to test for equality of the coefficents, $\beta_1$and $\beta_2$ between the two samples.

$y_1 = X_1\beta_1 + \epsilon_1$

My instinct is to treat it as if they came from the same regression, and do a t-test as follows:


Would there be any issue doing it this way?

  • 1
    $\begingroup$ Your notation is confusing, because it suggests there are two different models used for the same set of samples. What do the double subscripts in the denominator mean? Which should we believe: the notation or the words? $\endgroup$
    – whuber
    Commented May 9, 2022 at 21:00
  • $\begingroup$ My notation is likely wrong. It is the same model for 2 sets of samples. I want to test whether the regression coefficients for the 2 samples are the same $\endgroup$ Commented May 9, 2022 at 21:22
  • $\begingroup$ Then, assuming the responses in one sample are independent of those in the other, you have observed two independent random variables and you have estimates of their sample variance: that leads to your t-test formulation, at least upon making standard assumptions (such as approximate Normality of the errors). $\endgroup$
    – whuber
    Commented May 9, 2022 at 21:34
  • $\begingroup$ Okay thanks. I guess this is the issue. If the explanatory variable represents returns to education, and the samples are two different groups of people (e.g. lawyers and investment bankers for instance), would you say they are likely not independent, as both their coefficients are probably correlated with quality of schools (i.e. if schools in general are better, both their returns to education coefficients would go up together) or am I misinterpreting this? $\endgroup$ Commented May 9, 2022 at 21:41
  • $\begingroup$ You might be overcomplicating it. What matters are the responses conditional on the explanatory variables. Correlations among explanatory variables are not relevant in a regression model. $\endgroup$
    – whuber
    Commented May 10, 2022 at 13:34

1 Answer 1


If the dependent variables are same, you may combine the two samples and generate a indicator to identify which sample it is, then run the model with an interaction between the indicator and the key independent variable. Otherwise, if the dependent variables are different, you may run the regressions separately for each sample and use Seemingly unrelated estimation (suest) to combine the estimations and use test to check the equality of the coefficients. Notice, you may consider robust s.e. when using suest.

  • $\begingroup$ The problem with this is that it doesn't correctly model heteroscedasticity--and that's the very reason one would run two separate regressions in the first place. $\endgroup$
    – whuber
    Commented Oct 2, 2022 at 15:47
  • $\begingroup$ @whuber, hi, did you mean combining the two samples and assigning an indicator for the samples can't model heteroscedasticity? What about using VCE clustered at different groups/samples? If the two samples cannot be combined and estimated in one specification, i.e., one explanatory variable is not available in one sample, I suggest using suest to combine the regressions and produce a simultaneous variance-covariance matrix. $\endgroup$
    – xxg
    Commented Oct 3, 2022 at 10:46
  • $\begingroup$ The OP's approach ought to produce essentially the same results without going to all that effort. $\endgroup$
    – whuber
    Commented Oct 3, 2022 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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