Date: Thu, 12 Apr 2012 00:52:27 -0400
Reply-To: Søren Lassen <s.lassen@POST.TELE.DK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Søren Lassen <s.lassen@POST.TELE.DK>
Subject: Re: Missing
Content-Type: text/plain; charset=ISO-8859-1
Val,
Generally, SAS excludes missing values from statistics calculations.
The problem is that SAS does not see -9 as a missing value.
You will have to change you data before executing PROC MEANS. As your
data set is big, it may be worth the trouble to do the change using
a view (SQL or datastep) instead of a temporary table, e.g.
data v_temp/view=v_temp;
set have;
array x x1-x5;
do over x;
if x=-9 then x=.;
end;
run;
proc means data=v_temp;
var x1-x5;
/* etc. */
Using a view can save both disk space and processing time (as the large
table is only read once).
Regards,
Søren
On Tue, 10 Apr 2012 14:40:17 -0700, Val Krem <valkrem@YAHOO.COM> wrote:
>Hi all,
I� big data set containing several variable.� Some of the variables have
missing observation� represented by -9.
I want to calculate means of each variable by excluding the the missing
observations
I used proc means; var� x1 x2 x3 x4 x5;
Does proc means have option that exclude the missing observation?
Thanks� in advance