Date: Tue, 11 May 2010 07:18:10 -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: Table of means
In-Reply-To: <201005111032.o4B0bDTh010309@malibu.cc.uga.edu>
Content-Type: text/html; charset="us-ascii"
<html>
<body>
At 06:32 AM 5/11/2010, David Marso wrote:<br><br>
<blockquote type=cite class=cite cite=""><tt><font size=2>COMPUTE
SubID=$CASENUM.<br>
VECTOR V=Brand1_Attrib1 TO Brand3_Attrib4.<br>
LOOP Brand=1 to 3.<br>
+ DO REPEAT A=1 TO 4 /NewA=Attrib1 TO Attrib4.<br>
+ COMPUTE NEWA=V((B-1)*4 +
A).<br>
+ END REPEAT.<br>
+ XSAVE OUTFILE "Restructured.sav" <br>
</font>
<font size=2>/KEEP SubID Brand Attrib1 TO Attrib4<br>
END LOOP.<br>
EXE.<br>
GET FILE "Restructured.sav" .<br>
</font></tt>Then your TABLE or MEANS command as previous ;-)<br>
I just couldn't resist the OLD SKOOL intrusion here !!!!<br>
We don't needs to spell out any stinking variable names
;-)</blockquote><br>
Good old XSAVE. I reluctantly converted to VARSTOCASES myself, but yes,
XSAVE can do marvelous things including, as you say, not need as many
variable names written explicitly.<br><br>
The many-to-many merge algorithm for which I claim joint credit with you,
David, takes advantage of just this feature of XSAVE. In the process,
neatly solving a problem that's been around the list, off and on, for
years.</body>
<br>
</html>
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
|