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 (May 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 12 May 2007 08:01:02 -0500
Reply-To:     "Beadle, ViAnn" <viann@spss.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Beadle, ViAnn" <viann@spss.com>
Subject:      Re: how to compute mean of one variable
Comments: To: Albert-jan Roskam <fomcl@yahoo.com>
In-Reply-To:  <137506.75061.qm@web32707.mail.mud.yahoo.com>
Content-Type: text/plain; charset="US-ASCII"

Search for What's New in Help--You'll find a topic for every release going back about release 7.

-----Original Message----- From: Albert-jan Roskam [mailto:fomcl@yahoo.com] Sent: Saturday, May 12, 2007 5:14 AM To: Beadle, ViAnn; SPSSX-L@LISTSERV.UGA.EDU Subject: Re: how to compute mean of one variable

Wow, is the MODE=ADDVARIABLES new? I've been using v11 for a long time, but recently we upgraded to v14. I never knew about this feature. VERY HANDY!

More generally, is there a "What's knew" document for each new release of SPSS?

Albert-Jan

--- "Beadle, ViAnn" <viann@spss.com> wrote:

> Use AGGREGATE to do this. Since AGGREGATE expects a > break variable, create a constant variable and break > on that. > 1. First compute your constant variable with: > > COMPUTE constant=1. > > Then go to Data>Aggregate. > > Add the constant as your break variable and y as > your aggregated variable. Make sure to check the > third radio button in the Save group box. Paste or > run the syntax which will look like this: > > AGGREGATE > /OUTFILE=* MODE=ADDVARIABLES > /BREAK=constant > /y_mean=MEAN(y). > > The MODE=ADDVARIABLES keyword is the critical thing > that adds that mean back as a new variable to the > active file. > > -----Original Message----- > From: SPSSX(r) Discussion > [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of > LUCINDA M TEAR > Sent: Friday, May 11, 2007 7:19 PM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: how to compute mean of one variable > > Hello, > > I am sorry to bother you all with such a simple > question, but I do not seem to be able to understand > from documentation how to compute the mean of a > variable so that it becomes available to me as a > constant. > > I would like to be able to compute x = mean(variable > y) but do not seem to be able to figure out how to > loop through the cases of a variable to either sum > or average or count them. It seems that arithmetic > functions apply only across variables within a case. > I have tried to use the aggregate function, but > since I want the mean of an entire variable (not by > any break variable), the command won't process. > From what I can tell, the index for vectors refers > to an entire vector and not to a case within a > vector. > > I am sure that this is very simple and I really > apologize for being so unable to crack the > documentation about it. It probably requires a > macro and I am still struggling with these... > > Thank you for any pointers (even to previous list > answers.). > > Lucinda Tear >

Cheers! Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

____________________________________________________________________________________Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz


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