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 (November 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 22 Nov 2004 17:55:22 +0200
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Martins Liberts <>
Subject:      Re: Adding Group totals in the same file
Content-Type: text/plain; charset="us-ascii"


***Untested syntax***.

agg out="temp.sav" /break year age gender /a1 a2 a3 a4=sum(a1 a2 a3 a4).

add files /file=* /file="temp.sav" /in gr_tot.

sort cases by year age gender gr_tot.

-- Martins Liberts Central Statistical Bureau of Latvia address: Lacplesa iela 1, Riga, LV-1301, Latvia phone: 371-7366877 email:

"Paparodopoulos, Nikos" <> Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> 22.11.2004 10:51 Please respond to "Paparodopoulos, Nikos"

To: SPSSX-L@LISTSERV.UGA.EDU cc: Subject: Adding Group totals in the same file

Dear list,

I have a set of Group Variables i.e. Year, Age, Gender and a series of Numeric Variables A1, A2, A3, A4.

I would like to create & insert a new case in the existing sav. file showing the Totals for each Numeric variable following each combination of Group Variable values.

I.e a new case with group totals for A1, A2, A3, A4 should follow immediately after Year - 1999 , Age - 20, Gender - Male

Year - 1999 , Age - 20, Gender - Female

Year - 1999 , Age - 21, Gender - Male

Year - 1999 , Age - 21, Gender - Female etc.

Any help would be very much appreciated.

Thanks in advance.

Best Regards

Nikos Paparodopoulos

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