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 (September 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Sep 2003 11:02:06 +0200
Reply-To:     Antoon Smulders <a.smulders@beke.nl>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Antoon Smulders <a.smulders@beke.nl>
Subject:      Re: should be real simple... counting unique cases
Content-Type: text/plain; charset="iso-8859-1"

Hi Jude

What about: AGGREGATE OUTFILE * /BREAK yourvar /n_break = n.

Antoon Smulders

----- Original Message ----- From: "Jude Cosgrove" <Jude.cosgrove@erc.ie> Newsgroups: bit.listserv.spssx-l To: <SPSSX-L@LISTSERV.UGA.EDU> Sent: Thursday, September 25, 2003 10:32 AM Subject: Re: should be real simple... counting unique cases

> Could you also use the aggregate command, and request that the aggregate > file also saves the number of cases per break variable such that if > N_BREAK=1, then that particular value is unique? Then save to a new file > with the condition that N_Break=1? > > You should find the syntax very quickly using GUI and paste. > > HTH > Jude > > Jude Cosgrove > Research Associate > Educational Research Centre > Drumcondra > Dublin 9 > > jude.cosgrove@erc.ie > > Ph +353 1 837 3789 > Fax +353 1 837 8997 > > > -----Original Message----- > From: Marks, Jim [mailto:Jim.Marks@lodgenet.com] > Sent: 24 September 2003 14:16 > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Re: should be real simple... counting unique cases > > > Nico: > > There are many ways to skin this cat. I like AUTORECODE: > > DATA LIST FREE /vara (A1). > BEGIN DATA > 1 1 1 1 2 2 3 3 4 4 5 5 5 6 6 6 > 7 7 7 7 7 8 9 9 > END DATA. > > AUTORECODE vara /INTO varnbr. > DESCRIPTIVES varnbr /STAT=max. > > > The maximum value of varnbr is the number of unique values. > > For numeric variables, you can use > > RANK varnbr /RANK INTO varcnt /TIES=CONDENSE. > > Cheers > > Jim Marks > Senior Market Analyst > LodgeNet Entertainment Corporation > > > -----Original Message----- > From: Nico Peruzzi, Ph.D. [mailto:nperuzzi@yahoo.com] > Sent: Tuesday, September 23, 2003 5:28 PM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: should be real simple... counting unique cases > > > SPSSers, > > I know I'm missing something real simple here, but how does > one count the number of unique cases in a variable as > follows: > > String variable A: > 1 > 1 > 1 > 2 > 2 > 2 > 3 > 3 > 4 > 4 > 5 > 6 > 7 > 7 > 7 > 7 > 8 > 8 > 9 > 9 > > I want to know how many unique numbers are in this > variable. > > Thanks in advance, Nico > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com >


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