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 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 4 Nov 2003 17:17:17 +0100
Reply-To:     Staffan Lindberg <Staffan.Lindberg@fhi.se>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Staffan Lindberg <Staffan.Lindberg@fhi.se>
Subject:      SV: Averaging across columns with missing values
Comments: To: chris fisher <cfisher@jjay.cuny.edu>
Content-Type: text/plain; charset="iso-8859-1"

Sorry I read your question to fast, it should be

compute newvar=mean.1(var1,var2,..............varn). exe.

It demands only 1 valid variable (not containing missing)for the whole array. If you demand 2, just write sum.2

best

Staffan Lindberg National Institute of Public Health Sweden

-----Ursprungligt meddelande----- Från: chris fisher [mailto:cfisher@jjay.cuny.edu] Skickat: den 4 november 2003 17:12 Till: SPSSX-L@LISTSERV.UGA.EDU Ämne: Averaging across columns with missing values

What would the syntax be for averaging across ten columns of data, where some of the columns had system missing data???

I tried a simple (day1+day2+day3+day4....)/10

But it only works for the cases that have values in all 10 columns. I can't just do a fill or set missing equal to zero because all subjects were not expected to have 10 data points, it is ok if someone only has day1 and day2, but I'd still like to know the average.

Thanks!


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