David and Listservers,
I am also trying to write syntax to conduct a Chows test to see if "year of hospitalization" (1998, 1999, 2000, 2001, 2002, 2003) should be included in my regression model as an independent variable. I have 3 models/research questions: Model 1: dependent variable (Y)= continuous Model 2: dependent variable (Y)= continuous Model 3: dependent variable (Y)= categorical All 3 models have 9 independent variables (X) which are categorical. In my case, how do I modify the below syntax? Can you clarify the "Group" variable? Thank you in advance. Anthony On Wed, 10 Oct 2001 11:18:01 -0500, Matheson, David <[hidden email]> wrote: >Jean, > There are a pair of solutions on our AnswerNet for performing the Chow >test - no pen & paper work required. I've pasted them below. The first >solution was written more recently and uses the UNIANOVA procedure >(Analyze->General Linear Model->Univariate in the menus). The second >solution is older, uses the Regression procedure and is slighltly more >labor-intensive in that it requires you to compute some interaction >variables before running the Regression. > >David Matheson >SPSS Technical Support >[hidden email] >(312)651-3410 >Try the SPSS AnswerNet at http://www.spss.com/tech/answer . > >Solution 100009917: An easy way to perform a Chow test > >Q. >Can you show me how to perform a Chow test in SPSS? > > >A. >The Chow test provides a test of whether the set of linear regression >parameters (i.e., the intercepts and slopes) is equal across groups. SPSS >AnswerNet Solution ID 100000298 presents a thorough description of what >Chow test is, how it may be calculated, and how to use COMPUTE statements >and the SPSS REGRESSION procedure to obtain a Chow test. The present >solution shows a more convenient way to conduct this test using SPSS's >General Linear Model (GLM) procedure. > >The easiest way to do this is to build a simple model from the dialog boxes, >paste the syntax into an SPSS Syntax Editor window, make a slight >modification to the DESIGN subcommand, and then run the commands from the >editor window. We'll show you how to do this using a hypothetical example. > >Let's say we have a dependent variable named Y, a continuous predictor named >X, and a categorical variable named Group. Here are the steps you'll want >to follow to conduct the Chow test. > > 1. From the menus, go to Analyze->General Linear >Model->Univariate.... > 2. In the Univariate dialog box, move Y into the box labeled >Dependent Variable. > 3. Move the grouping variable Group into the box labeled Fixed >Factor(s). > 4. Move the continuous predictor X into the box labeled >Covariate(s). > 5. Now, instead of clicking OK, click PASTE. The contents of >syntax window should appear as follows. > > UNIANOVA > y BY group WITH x > /METHOD = SSTYPE(3) > /INTERCEPT = INCLUDE > /CRITERIA = ALPHA(.05) > /DESIGN = x group . > > 6. In the SPSS Syntax Editor Window, modify the DESIGN subcommand >to read as shown below. > > UNIANOVA > y BY group WITH x > /METHOD = SSTYPE(3) > /INTERCEPT = INCLUDE > /CRITERIA = ALPHA(.05) > /DESIGN = x group*x. > > 7. Finally, run the commands by going to the menu in the SPSS >Syntax Editor Window and selecting Run->All. > >Including the Group*X interaction--in the absence of a main effect for >Group--causes SPSS GLM to pool the Sums of Squares and degrees of freedom >from the sources Group and Group*X when it reports the F-test for Group*X. >Given a model that included Group and Group*X, the Group term would test >differences in intercepts and the Group*X term would test differences in >slopes. Pooling these terms into a single Group*X term means that the >F-test and the associated p-value for the Group*X test is the overall test >of whether the full set of regression parameters (i.e., the slopes and >intercepts taken together) differ among groups. Hence, the Group*X effect >in this model is the Chow test we are looking for. > >***************************** > >Solution 100000298 : Chow test for equal sets of regression coefficients >across groups > >Q. >What is the formula for the Chow test for equal regression >parameters across groups? Will SPSS perform this test? > > >A. >There is no SPSS procedure or keyword which requests the Chow test >by name, but the test is easy to obtain from the REGRESSION procedure. >The Chow test provides a test of whether the set of linear regression >parameters, i.e. the intercepts and slopes, is equal across groups. >For example, suppose we use the variable SALNOW from SPSS for >Windows' bank.sav sample data set as our dependent variable and >EDLEVEL as our predictor. Also suppose that we want to know whether >the intercept and slope for this regression are equal for men and women. >The algorithm for the Chow test is as follows: > >1. Run the regression on men and women together and note the > residual sum of squares and degrees of freedom. Call this > RSS1 and DF1. >2. Run the regression separately for men and women and total > the residual sums of squares and degrees of freedom from the > two regressions. Call these RSS2 and DF2. >3. Find (RSS1 - RSS2)/(DF1 - DF2) . >4. Divide the result of step3 by RSS2/DF2 and compare this result to > the F distribution with (DF1-DF2) and DF2 degrees of freedom. > The null hypothesis for this test is that the regression intercept > and slope are both independent of gender. > >You can perform this test in SPSS REGRESSION and also obtain separate >tests for the equality of intercept and slope across genders. The group >variable should be a dummy variable which equals 0 for 1 group; 1 for >the other. The bank.sav variable SEX is already in this form, with a >value of 1 representing female. An interaction term is computed as the >product of the predictor of interest (EDLEVEL) and SEX. REGRESSION is >run first with only EDLEVEL as a predictor. SEX and the interaction >term, called EDSEX in this example, are then entered in a second step >with a second /METHOD = ENTER subcommand. The change in R square is >requested with the keyword CHA in the /STATISTICS subcommand. This >keyword also requests a test of whether the change in R square is >greater than 0. This test is equivalent to the CHOW test as calculated >from steps 1 to 4 above. The standard statistical output from >REGRESSION also provides tests and confidence intervals for the SEX >and EDSEX coefficients, which are effectively adjustments to the >intercept and slope parameters, respectively, for female respondents. >The REGRESSION command to perform this analysis is presented below. > >COMPUTE edsex = edlevel * sex . >REGRESSION > /DESCRIPTIVES MEAN STDDEV CORR SIG N > /MISSING LISTWISE > /STATISTICS COEFF OUTS CI R ANOVA END CHA > /CRITERIA=PIN(.05) POUT(.10) > /NOORIGIN > /DEPENDENT salnow > /METHOD=ENTER edlevel > /METHOD=ENTER sex edsex . > >The above command can be run from the graphic user interface (GUI) in >The interaction terms can be computed from the Transform->Compute menu. >Blocks of variables can be entered by clicking the Next button (above the >Independent(s) box in the main Regression dialog) after entering the >predictors for each block except the last. The 'Change in R squared' (CHA) >test is available from >the Statistics dialog of the Regression procedure. Users of SPSS versions >prior to SPSS 7.5 should note that the test of change in R squared can not >be requested from the dialog boxes. The simplest workaround for this absence >is >to build most of the command in the dialogs, paste the command to a syntax >window, >and add the CHA keyword to the /Statistics subcommand. > >If there were K groups whose regression coefficients were to be >compared, you would compute K-1 dummy variables and multiply each of >these by the independent variable(s) to produce K-1 (sets of) >interaction variables. > >The Chow Test is introduced in Gregory Chow's paper, 'Tests of Equality >Between Sets of Coefficients in Two Linear Regressions', Econometrica, >28(3), 591-605. > >For discussions of the dummy variable approach to the Chow test, see a >pair of papers by Damodar Gujarati in The American Statistician, >1970, 24(1), 50-52; and 1970, 24(5), 18-22. > > >-----Original Message----- >From: J.Russell [mailto:[hidden email]] >Sent: Wednesday, October 10, 2001 5:47 AM >To: [hidden email] >Subject: A Challenge : Enquiry about the CHOW Test in SPSS > > >Dear All > >This is one of those frustrating times when someone has asked me >something. I know that give a week or so I probably could do the >programming required but I simply do not have the time. > >The user is looking for the CHOW test in SPSS. > >If you want to know what that is there is a clear description at: > >http://www.stata.com/support/faqs/stat/chow.html > >(No I am not advertising a competitor as it is not in stata apparently >either!) > >No I can see how to get the figures require out of three >regressions, one regression or a single ANOVA in SPSS. > >The thing is the last bit of the job seems to be a calculator, book of >tables, pen and paper job. > >Now I can get UNIANOVA to put the relevant table into a data file >but then comes the hard part of calculating the actual statistic. > >Please has anyone done it other than by pen or paper? If so would >they mind letting me have the code so I can pass it on? > >Thanks a lot. > >Jean M. Russell > > >------------------------------------------------------ >Jean M. Russell M.A. M.Sc. [hidden email] >Corporate Information & Computing Services, >University of Sheffield >285 Glossop Road >Sheffield >S10 2HB >United Kingdom >Phone: 0114-222-3098 >Fax : 0114-222-3040 |
Free forum by Nabble | Edit this page |