LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1996)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 13 Dec 1996 13:15:32 -0600
Reply-To:     marso@spss.com
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         David Marso <marso@SPSS.COM>
Organization: SPSS Inc
Subject:      Re: aggregate regression analysis
Comments: cc: dshade@welchlink.welch.jhu.edu
Content-Type: text/plain; charset=us-ascii

NLR will save parameter estimates AND allow split file. If we recall, A linear model is a special case of a nonlinear model. If you have Advanced statistics then the problem resolves to a 6 line program or about a dozen or so mouse-clicks. David Marso

DATA LIST / ID X Y 1-3. BEGIN DATA 123 145 134 134 178 234 256 287 234 298 END DATA . SPLIT FILE BY ID. * THIS REGRESSION IS JUST A REALITY CHECK*. REGRESSION VARIABLES X Y / DEP Y / METHOD ENTER X.

COMPUTE CONSTANT=1. * NonLinear Regression. MODEL PROGRAM A=0 B=0 . COMPUTE PRED_ = A* constant + B * x. NLR y /OUTFILE='SPSSFNLR.TMP' /PRED PRED_. GET FILE 'SPSSFNLR.TMP'. FORMATS A B (F20.16). LIST.

ID A B SSE NCASES

1 1.0000000000000000 1.0000000000000000 .00000000 5 2 2.2820512820512830 .6282051282051280 .48717949 5

Number of cases read: 2 Number of cases listed: 2 Klaudia Erhardt wrote: > > Dave Shade (dshade@welchlink.welch.jhu.edu) wrote: > > : We'd like to get an output something like this: > : Subj# SlopeVar1 > : 1 1 > : 2 2 > : 3 0.5 > > If you want to have the slope of a linear regression, you can proceed as > follows: > 1. Use 'split file' by case # > 2. do a ordinary linear regression, but save the unstandardized predicted > values. As a result you get a regression line for each of your cases. > What you need now is the slope of each of those regression lines. > > 3. aggregate: break = case# > functions = FIRST value of pred_1, LAST value of pred_1, > N of cases (group). > 4. Now use the aggregated file. > Compute h1= LASTvalue - FIRSTvalue. > compute h2= N of cases - 1. > compute slope = h1 / h2. > 5. With 'merge files' you can add the slope to your original file if you > like. > > This should work with a linear regression. A nonlinear regression > (variable slope) is more difficult and I don't know how to do it. > -- > Klaudia Erhardt > Zentralinstitut fuer Sozialwissenschaftliche Forschung > FU Berlin


Back to: Top of message | Previous page | Main SPSSX-L page