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 (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 Feb 2005 10:49:34 +0100
Reply-To:     Spousta Jan <JSpousta@CSAS.CZ>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Spousta Jan <JSpousta@CSAS.CZ>
Subject:      Re: syntax:  relative frequency in new variable
Comments: To: Lorenz Dobler <>
Content-Type: text/plain; charset="iso-8859-1"

Thank you, Lenz - and one remark: I have forgotten to turn off the weights. Add please this command at the end of my syntax:


otherwise it will produce strange results if analyzing the data :-)


-----Original Message----- From: Lorenz Dobler [] Sent: Thursday, February 24, 2005 10:46 AM To: Spousta Jan Subject: AW: syntax: relative frequency in new variable

Hi Jan

It works, thank you very much!! As a novice in spps-syntax I am really impressed, how fast you got the answer while I was twisting my mind for at least two days in vain . You should earn money with your comments ! ;-)



-----Ursprüngliche Nachricht----- Von: Spousta Jan [mailto:JSpousta@CSAS.CZ] Gesendet: Donnerstag, 24. Februar 2005 10:12 An: Lorenz Dobler Betreff: RE: syntax: relative frequency in new variable

Hi Lenz, try this:

WEIGHT BY n . RANK VARIABLES=n (A) /N INTO relfreq /PRINT=NO /TIES=MEAN . COMPUTE relfreq = n / relfreq. EXECUTE. FORMATS relfreq (F4.2). VAR LAB relfreq "Relative frequency".


-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Lorenz Dobler Sent: Thursday, February 24, 2005 10:08 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: syntax: relative frequency in new variable

Hello list members,

I have created an (aggregated) sav-file with absolute frequencies (=n) of case groups. Now I want to calculate relative frequencies (percentage) of groups in an additional variable. Does anyone of you have an idea how to do that with syntax ? The result should look like the following example:

Group n (sum=1000) relative frequency (?)

A 100 0.10

B 200 0.20

C 250 0.25

D 50 0.05

.... . ..

Kind regards


Dr. Lorenz Dobler

Umweltprobenbank des Bundes - Teilbank Humanproben

Domagkstrasse 11

48149 Münster

Tel.: 0251/8352307

FAX: 0251/55524

email: <>

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