LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 24 Jul 2006 16:00:48 -0500
Reply-To:     "Beadle, ViAnn" <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Beadle, ViAnn" <>
Subject:      Re: aggregate or matrix?
Comments: To: Frank Berry <>
Content-Type: text/plain; charset="iso-8859-1"

Have you looked at the reporting tools rather than doing this through AGGREGATE. By this I mean things like TABLES, or CTABLES. -----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Frank Berry Sent: Monday, July 24, 2006 2:30 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: aggregate or matrix?

Hi all, I have four variables (subj, region, eth - all char variables, and score - numeric variable) with a total of 20,000 records.

Below is a syntax used to get count (N), average, standard deviation (SD) and pct for each category (e1 to e5) in the variable of 'eth' BY 'subj' 'region' 'eth'.

AGGREGATE /OUTFILE = 'C:\Data\Sum_A.sav' /BREAK = subj region eth /count = N /avg = MEAN(score) /sd = SD(score) /eth1_frac = FIN(eth,1,1) /eth2_frac = FIN(eth,2,2) /eth3_frac = FIN(eth,3,3) /eth4_frac = FIN(eth,4,4) /eth5_frac = FIN(ethnic,5,5). COMPUTE eth1_N = eth1_frac*count. COMPUTE eth2_N = eth2_frac*count. COMPUTE eth3_N = eth3_frac*count. COMPUTE eth4_N = eth4_frac*count. COMPUTE eth5_N = eth5_frac*count. COMPUTE e1_Pct = eth1_N/count*100. COMPUTE e2_Pct = eth2_N/count*100. COMPUTE e3_Pct = eth3_N/count*100. COMPUTE e4_Pct = eth4_N/count*100. COMPUTE e5_Pct = eth5_N/count*100. Execute.

Below is what I'd like to get in addition to the count, mean and SD BY 'subj' 'region' 'eth'. region eth N pct prop 0001 e1 1 2% 0.015384615 0001 e2 5 8% 0.076923077 0001 e3 22 34% 0.338461538 0001 e4 30 46% 0.461538462 0001 e5 7 11% 0.107692308 0001 Total 65 100% 1 But the aggregate function above doesn't seem to work here. Is there a solution using matrix or other functions/syntax? Thank you. Frank


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