| Date: | Thu, 1 Jun 2006 13:27:53 -0400 |
| Reply-To: | Richard Ristow <wrristow@mindspring.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Richard Ristow <wrristow@mindspring.com> |
| Subject: | Re: Comparing regression coefficients |
|
| In-Reply-To: | <8AE883D86DBAAF4E9924E984A06927F20286F1E6@mcintire6.comm.vi
rginia.edu> |
| Content-Type: | text/plain; charset=us-ascii; format=flowed;
x-avg-checked=avg-ok-4FA329B5 |
|---|
At 09:32 AM 6/1/2006, Baglioni, Tony wrote:
>I have comparable data for two years. I have obtained the regression
>equations for each year and now I want to compare the obtained
>coefficients. I had a text that showed a simple t or z test for doing
>this it's been lost through the ages. Does anyone know a simple test
>for this comparison?
It's reasonably simple, but it takes a little calculation in the
transformation language. And you have to re-run the regression, so you
need to have the data available.
Suppose your model is
Y = C + SUM(i=1,k:c(i)X(i)).
Here, Y is the independent; C is the constant; and there are k
independents, X(1) to X(k), with coefficients c(1) to c(k).
You solve the problem by re-casting it as a test that certain
coefficients are zero. Here's where you need the data:
A. Combine the data for the two years. Let there be a variable YEAR2
which is an indicator variable for the second year: it is 0 for year 1,
1 for year 2. (You can do this with IN= clauses on ADD FILES, plus some
computation.)
B. Calculate, for i = 1 to k,
X2(I) = 0 if YEAR2 = 0
X2(I) = X(I) if YEAR2 = 1.
(This is a fairly simple exercise in DO REPEAT).
C. Estimate the model
Y = C + YEAR2 + SUM(i=1,k:c(i)X(i))+ SUM(i=1,k:c2(i)X2(i)).
(WARNING: variable YEAR2 *must* be in the model.)
D. Test for equality of coefficients is then the test that all the
c2(i) are zero. In SPSS regression, this would be (code not tested)
REGRESSION DEPENDENT=y
/METHOD = ENTER(YEAR2,X_1 TO X_k)
/METHOD = TEST (X2_1 TO X2_k).
|