Date: Thu, 14 May 2009 10:32:32 -0400
Reply-To: Art@DrKendall.org
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Art@DrKendall.org>
Organization: Social Research Consultants
Subject: Re: Macro Problem
In-Reply-To: <c9a06cdd0905140714m5c1e7729u8beb84fd1160620f@mail.gmail.com>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
I only have an impression of what you are trying to do. Please post a
more detailed description of what you are trying to do and what you are
going to with the resulting variables.
It appears that you have 3 sets of 5 variables and are trying to get
count of the occurrence of those codes in each set.
If that is correct and that is all you need, it is possible that using
AUTORECODE with the GROUP subcommand follow by MULT RESPONSE will do
what you want.
Art Kendall
Social Research Consultants
angelina garnica wrote:
> Hi, I´m new using macro. After a lot of trys I write this code, but it
> dosen't work.
>
> *////////// PRUEBA_1.
> DEFINE !codigos (vnames=!CMDEND)
> VECTOR c=v1 TO v5.
> VECTOR d=imp_conc1 TO imp_conc5.
> !DO !cnt=1 !TO 5
> IF (c(!cnt)) = !QUOTE(!vnames).
> COMPUTE !CONCAT('c_', !vnames) = d(!cnt).
> !DOEND
> !ENDDEFINE.
> *//////////.
>
> SET MPRINT = ON.
> !codigos vnames = 001_001 001_002 001_003.
> (I have more than 100 codes)
>
> The idea is repeat this sintax for all codes.
>
> VECTOR c=v1 TO v5.
> VECTOR d=imp_conc1 TO imp_conc5.
> LOOP cnt=1 TO 5.
> DO IF (c(cnt)) = '001-001'.
> COMPUTE c_001_001= d(cnt).
> END IF.
> END LOOP.
> EXECUTE.
>
> I hope you can help me.
>
> Angelina
=====================
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
|