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 (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Feb 2005 08:45:29 -0500
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Art Kendall <Art@DRKENDALL.ORG>
Organization: Social Research Consultants
Subject:      Re: simplifying a series of commands
Comments: To:
In-Reply-To:  <>
Content-type: text/plain; charset=ISO-8859-2; format=flowed

I concur with Dr Spousta.

However, I would like to add a couple of suggestions. When you enter the syntax into the syntax window (either directly of via <paste> from the GUI), highlight COUNT and click the syntax button to see what else can be done with COUNT.

In your original syntax you use "=" both as a logical operator and as an assignment operator. It often results in more readability and hence less confusion for yourself, your quality assurance reviewer, and those trying to help you if you use the conventional logical operators EQ GT GE LE LT OR AND. The symbolic operators are harder to read with most fonts and lighting conditions. Both approaches are syntactically correct and will result in the same operations when you have finished refining the syntax. It make the most difference during the refining and reviewing phases.

Art Social Research Consultants University Park, MD USA (301) 864-5570

Spousta Jan wrote:

>Hi Bob, > >I would use the COUNT command instead of compute here - it is much easier to produce and read. > >Menu: Transform -> Count. > >E.g. > >COUNT psy = dx1 to dx7 (2, 3, 4). >EXECUTE . > >Greetings > >Jan > >-----Original Message----- >From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of >Bob Green >Sent: Monday, February 21, 2005 9:02 AM >To: SPSSX-L@LISTSERV.UGA.EDU >Subject: simplifying a series of commands > > >I was asked about a method to compute the frequency of certain values >across multiple variables (dx1, dx2, dx3, dx4, dx5, dx6, dx7) . > >The following syntax performs the task, however, it will be a lot of work >to perform this for the remaining values. > > >COMPUTE psy = dx1=2 or dx1=3 or dx1=4 or dx2 =2 or dx2=3 or dx2 = 4 or dx3 >=2 or dx3 =3 or dx3=4 or dx4 = 2 or dx3=3 or dx4 =4 or dx5 =2 or dx5 =3 or >dx5= 4 or dx6 =2 or dx6=3 or dx6 =4 or dx7 =2 or dx7=3 or dx7=4 . >EXECUTE . > >Any assistance with the above is appreciated, > >Bob Green > > > >

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