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
From: Paul Hover [mailto:firstname.lastname@example.org]
Sent: 31 July 2003 15:41
Subject: Column in table with cum. %
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:
/ftotal=$1"total" $2 "total"
/table=quest1 + $1 by sex + $2
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.
Thanks in advance!
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software