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 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Sep 2005 14:29:58 -0500
Reply-To:     Arthur Aguirre <arthur.aguirre@INCEPTA-MI.COM>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Arthur Aguirre <arthur.aguirre@INCEPTA-MI.COM>
Subject:      Re: Create denominator from Frequencies
Content-Type: text/plain; charset="us-ascii"

Hi Group,

I am still looking for assistance here. Original posting:

Say I have these data.

DATA LIST LIST /country. BEGIN DATA 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 END DATA.

freq/var = country .

How can I create a variable equal to the frequency of variable country? I would like to use this variable (frequency count) as the denominator in a calculation.

Denominator should be 10, 4, 2 for country 1, 2, 3, respectively.

The solution below is not working for me.

Thanks. Arthur

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Vishal Dave Sent: Wednesday, September 21, 2005 1:19 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Create denominator from Frequencies

Arthur,

You can use AGGREGATE COMMAND for creating frequency variable. If you want frequency variable in the same data then you don't need to generate another data file but if you want aggregated data with frequency variable then you need to generate another data file. Below is the sample code :

***************************************************

DATA LIST LIST /country. BEGIN DATA 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 END DATA. SORT CASES BY country .

*Use this if you want frequency variable in same data file AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /PRESORTED /BREAK=country /Frequency=N. *Use this if you want frequency variable in aggregated data file AGGREGATE /OUTFILE='C:\TEMP\temp.sav' /PRESORTED /BREAK=country /Frequency=N. GET FILE='C:\TEMP\temp.sav'. LIST.

************************************************************************

Hope this helps, Vishal.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Arthur Aguirre Sent: Wednesday, September 21, 2005 12:20 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Create denominator from Frequencies

Hi group,

Say I have these data.

DATA LIST LIST /country. BEGIN DATA 1 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 END DATA.

freq/var = country .

How can I create a variable equal to the frequency of variable country? I would like to use this variable (frequency count) as the denominator in a calculation.

Denominator should be 10, 4, 2 for country 1, 2, 3, respectively.

Thanks. Arthur

______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________


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