|
|
沙发

楼主 |
发表于 2010-1-14 01:54:10
|
只看该作者
Re: 如果取出所要的数据?
[code:1yy7ljdn]*generate the dataset;
data a;
length day 8 name $1 value 8;
letter = 'ABCDEFGHIJKLMNOPQRSTUVWX';
do day =1 to 10;
j=1;
do while(^missing(substrn(letter, j,1)));
name = substr(letter, j, 1);
value =int(ranuni(1)*50);
j+1;
output;
end;
end;
keep day name value;
run;
*find the 10% quantile;
proc univariate data =a noprint;
var value;
class day;
output out = b p10 = p10;
run;
proc sql;
create table c as
select a.day, a.name, a.value from a, b where a.day = b.day & a.value = b.p10;
quit;
*plot;
symbol i = join pointlabel =('#name');
proc gplot data = c;
plot value*day;
run;[/code:1yy7ljdn]
If values are not unique in the same day, you may find the multiple records for the p10.
*****JingJu***** |
|