LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 3 May 2004 13:47:47 +0200
Reply-To:     Henrik Lolle <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Henrik Lolle <>
Subject:      Re: Counting Unique Occurrences Across Variables
Comments: To: Mark Webb <>
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"; format=flowed

You could make two arrays. One for the existing variables and a new one with a number of cells equal to the maximum value occuring in the existing variables. Then make one loop through the existing variables where you transfer the values to the new array and where you use the values as array index. Afterwards you can count number of nonmissing values accross the new variables.

Best, Henrik

At 09:28 03-05-04, Mark Webb wrote: >The COUNT command counts the number of occurrences across variables. Is >there a command that reports the number of unique occurrence across >variables. An example will be demonstrate what I'm after. > >V1 V2 V3 Desired Answer > >1 2 3 3 >1 2 1 2 i.e. the '1' is only counted once. > >Any suggestions will be appreciated. > > > >Mark Webb >TargetLink Research >P O Box 13040 Mowbray 7705 >1st Floor, Standard Bank Building >37 Main Rd, Mowbray, Cape Town >Phone 021-689-8848 >Fax 021-686-9493 >Cell 072 199 1000 >e-mail

*********************************************************** Assistant Professor Henrik Lolle Department of Economics, Politics and Public Administration Aalborg University Fibigerstraede 1 DK 9220 Aalborg East ***********************************************************

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