| Date: | Tue, 4 May 2004 20:56:47 -0400 |
| Reply-To: | Raynald Levesque <rlevesque@videotron.ca> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Raynald Levesque <rlevesque@videotron.ca> |
| Subject: | Re: Counting Unique Occurrences Across Variables |
| In-Reply-To: | <6.0.1.1.1.20040503133027.03f5beb0@pophost.socsci.auc.dk> |
| Content-type: | text/plain; charset=us-ascii |
Hi
For a general solution, see the first example within file #1 of
http://pages.infinit.net/rlevesqu/SampleSyntax.htm#MultipleResp
Regards
Raynald Levesque rlevesque@videotron.ca
Visit my SPSS site: http://pages.infinit.net/rlevesqu/
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Henrik Lolle
Sent: May 3, 2004 7:48 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: Counting Unique Occurrences Across Variables
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 targetlk@iafrica.com
***********************************************************
Assistant Professor Henrik Lolle
Department of Economics, Politics and Public Administration
Aalborg University
Fibigerstraede 1
DK 9220 Aalborg East
http://www.socsci.auc.dk/institut2/dansk/empl/lolle.htm
***********************************************************
|