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 (July 1997)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Jul 1997 11:01:27 +0100
Reply-To:     Jeremy Miles <J.N.V.Miles@DERBY.AC.UK>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         Jeremy Miles <J.N.V.Miles@DERBY.AC.UK>
Subject:      Re: correl. of 1 variable with recd. type for pairs of records
Comments: To: Hank Becker <hjbecker@UCI.EDU>
In-Reply-To:  <33C286F1.5A69@uci.edu>
Content-Type: text/plain; charset="us-ascii"

At 10:29 08/07/97 -0800, Hank Becker wrote: >I have a data file where the cases are in pairs of records (much like >one would have with separate pre- and post-test files merged into a >single file). I want to compute simple correlations for each variable >between that variable and the "record type" (i.e., for matched pairs of >records constituting a single case). >

If I have understood correctly, you can create a new variable using the LAG command. This will create a new variable, shifted down one case.

So:

COMPUTE newvar = lag(oldvar) .

Will turn

Oldvar Newvar 1 [missing[ 2 1 3 2 4 3 5 4 6 5 6

Now remove all of the odd numbered cases using:

SELECT IF(mod($casenum, 2) = 0).

Will give:

Oldvar Newvar 2 1 3 2 4 3 6 5

=============================================================== Jeremy Miles, AVRU, Derby University, DE3 5GX Fax: 01332 622287 Tel: 01332 622222 x. 2146 j.n.v.miles@derby.ac.uk ======================No Space for a Joke======================


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