e****o 发帖数: 690 | 1 how to find 4 highest and mean, median, I don't know to get median by
industry as grouping except using proc means. Any good coding?? 3X for your
reply.
data temp;
do i=90 to 107;
xx=abs(i/i**2 -100*uniform(7));
industry = 10;output;
end;
do i=108 to 130;
xx=abs(i/i**2 -100*uniform(7));
industry = 20; output;
end;
run;
proc sort data=temp; by industry descending xx;
data t1;
set temp;
id + 1;
if first.industry then id =1;
run;
data t2 ;set t1 ;
if id<5;
run;
proc |
b*******r 发帖数: 152 | 2 what is exactly your question? -- how to get median?
btw, u missed a 'by' statement. |
o****o 发帖数: 8077 | 3 why not try PROC UNIVARIATE? |
e****o 发帖数: 690 | 4
code please?
【在 o****o 的大作中提到】 : why not try PROC UNIVARIATE?
|
o****o 发帖数: 8077 | 5 data BPressure;
do patientID=1 to 20;
x=ranpoi(4, 10);
do j=1 to x;
Systolic=rannor(888);
diastolic=ranuni(8888);
output;
drop j;
end;
end;
run;
proc sort data=BPressure; by patientID; run;
ods select none;
ods output ExtremeValues=XPval;
proc univariate data=BPressure nextrval=4;
by PatientID;
var Systolic Diastolic;
output out=_mean mean=sysmean Diamean
median=sysmedian diamedia
【在 e****o 的大作中提到】 : : code please?
|