Hi,
The table that I am working with contains over 600 metrics that I need to summarize and perform analysis on.
Without manually typing Sum(******)as ****** can this be performed keeping the metric names in source table?
Fred
Hi,
I am still getting the Error: A bug in Sas but the proc means is working.
Thanks you for your help.
Fred
PROC MEANS
Yes, use proc means or proc summary NOT proc SQL.
data have;
array test(100) test1-test100;
do i=1 to 1000;
do j=1 to 100;
test(j)=rand('normal');
end;
output;
end;
drop i j;
run;
proc means data=have noprint;
var test1-test100;
output out=want sum=;
run;
You can even omit the VAR statement to make it "more automatic".
That will include all numeric variables by default.
A lot of our identifiers facility/patient are numeric so I usually want to exclude them from summaries
I think for the most part identifiers "patient numbers" should be character.
Also for the OP with 600 metrics he may be more inclined to ignore a few sums or drop a few variables with a data set option. Also depends on what kind of "SAS Variable Lists" the OP can use, he did not mention the var names.
Hi,
I tried this
Proc Means noprint data = results (where =(date >= 2014-08-01 and date = 2014-08-07));
CLASS date;
output out=BM SUM=;
RUN;
I Get
ERROR: A bug in SAS has been encountered. please call your sas rep and report the following.
Error: zaqlopt - option 1003 not supported fro data set
date constants in SAS are written 'ddMONyyyy'd where MON is three char abbreviation for month.
I have to guess what you really meant in your where condition ... but try this instead:
Proc Means noprint data = results (where =(date >= '01AUG2014'd and date <= '07AUG2014'd));
CLASS date;
output out=BM SUM=;
RUN;
PG
Hi,
I am still getting the Error: A bug in Sas but the proc means is working.
Thanks you for your help.
Fred
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.