data a;
input factor1 factor2 factor3 factor4;
cards;
0.0038330781 -0.001292527 -0.021373516 0.0011244644
0.1165091219 -0.005491994 -0.043684809 0.0243698316
-0.005699065 0.027885766 -0.060709808 0.0202523605
0.009946479 0.0057016664 -0.052698794 0.0174758028
;
run;
proc univariate data=a;
var factor1;
output out=pctl pctlpts=33 66 pctlpre=p
cipctldf=(lowerpre=LCL upperpre=UCL); /* 12.1 options (SAS 9.3m2) */
run;
data b;
set pctl;
VarName='Factor1';Quantile = 0.33; Estimate = p33; Lower = LCL33; Upper = UCL33; output;
VarName='Factor1';Quantile = 0.66; Estimate = p66; Lower = LCL66; Upper = UCL66; output;
keep Varname Quantile Estimate Lower Upper;
run;
还有proc quantreg也可以实现,更简单, 一个procedure完成。
PS,下次麻烦把数据附上来,一个一个对着输好累。。。