Date: Thu, 31 Jul 2003 15:58:56 +0100
Reply-To: Peter Kaminski <Peter.Kaminski@glacomen.scot.nhs.uk>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Peter Kaminski <Peter.Kaminski@glacomen.scot.nhs.uk>
Subject: Re: Column in table with cum. %
Content-Type: text/plain; charset="iso-8859-1"
I hate junk messages but your subject matter caused more than a ripple of mirth in my office
-----Original Message-----
From: Paul Hover [mailto:pfhover2@yahoo.com]
Sent: 31 July 2003 15:41
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Column in table with cum. %
Dear all,
Spend a lot of time not solving this (simplified) situation. Didn't find a similar question in the listserve database either.
A database with 2 variables: 'quest' (values yes/no) and 'sex' (values m/f)
With this syntax I make a table:
tables
/ftotal=$1"total" $2 "total"
/table=quest1 + $1 by sex + $2
/statistics
cpct(sex(pct5.0)"":sex).
Now I would like to add an extra column in the table containing the cumulative percentages of $2 (the total of 'sex'). (not an extra 'cumulative variable' in the database!)
I tried using csum() and lag(), but that didn't work out.
Any suggestions?
Thanks in advance!
Paul Hover
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software