1. First we conduct the two regression analyses, one using the data from sample 1, the other using the data from sample 2. Here are a sample of the basic statistics:
Group | Intercept | Slope | SEslope | SSE | SDX | n |
Sample 1 | a1 | b1 | c1 | d1 | e1 | f1 |
Sample 2 | a2 | b2 | c2 | d2 | e2 | f2 |
2. The test statistic is Student’s t, computed as the difference between the two slopes divided by the standard error of the difference between the slopes, that is, t=(b1-b2)/SE* with (f1+f2 – 4) degrees of freedom, where the standard error of the difference between the two slopes is most easily computed as
SE*=SQRT(d1+d2)
* Please note that the test on slopes uses a pooled error term. If the variance in the dependent are unequal, you should use alternative methods. See Kleinbaum & Kupper (1978, Applied Regression Analysis and Other Multivariable Methods, Boston: Duxbury, pages 101 & 102) for a large (each sample n > 25) samples test, and Kleinbaum & Kupper page 192 for a reference on other alternatives to pooling.
Hope it's helpful!