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
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:
WEIGHT OFF.
otherwise it will produce strange results if analyzing the data :-)
Jan
-----Original Message-----
From: Lorenz Dobler [mailto:doblerl@uni-muenster.de]
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 ! ;-)
Regards
Lenz
-----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".
Jan
-----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
Lenz
Dr. Lorenz Dobler
Umweltprobenbank des Bundes - Teilbank Humanproben
Domagkstrasse 11
48149 Münster
Tel.: 0251/8352307
FAX: 0251/55524
email: <mailto:doblerl@uni-muenster.de> doblerl@uni-muenster.de