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 (June 2001)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 15 Jun 2001 10:52:38 -0300
Reply-To:     Hector Maletta <hmaletta@OVERNET.COM.AR>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Hector Maletta <hmaletta@OVERNET.COM.AR>
Subject:      Re: save frequencies as a variable and huber-white estimator
Comments: To: Helena Sanabria <helena@CADENT.ORG>
Content-Type: text/plain; charset=us-ascii

Helena Sanabria wrote: > - it's possible to save the frequencies from a variable as a new variable?

Yes, it's possible. You should use AGGREGATE to create variables that represent the frequencies, then MATCH FILES to add them to you original file. Example syntax:

GET FILE 'original.sav'. SORT CASES BY your variable. AGGREGATE OUTFILE 'frequencies.sav' /BREAK=your variable /FREQVAR 'Frequencies of your variable'=NU.

MATCH FILES FILE=* /TABLE 'frequencies.sav'/BY your variable. SAVE OUTFILE 'modified.sav'.

The aggregate command creates a new file with one case for each value of your variable. The only variables in this file are your variable and its frequencies. The match files command merges this aggregated file with your original file, adding to each case the frequency of the particular value of your variable shown by that case.

(replace 'your variable' by the name of your variable). This would do it for one particular variable. For several, just repeat the procedure. There must surely be ways to do it for several variables at once.

Hector Maletta Universidad del Salvador Buenos Aires, Argentina


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