全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1112 1
2013-12-08
悬赏 50 个论坛币 已解决
复制代码
如何将x的n p50 p25 p75放入macro中&n &p50 &p25 &p75?谢谢!

最佳答案

bobguy 查看完整内容

Here is an example. You can use univariate procedure for any quantile value. data t1; call streaminit(123); do i=1 to 100; x=rand('chisquare',2); output; end; run; proc means data=t1 noprint p25 p50 p75; var x; output out=q p25=x_p25 p50=x_p50 p75=x_p75; run; data _null_; set q; call symputx( 'x_p25',x_p25); call symputx( 'x_p50',x_p50); call symputx( ...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-12-8 01:36:33
Here is an example. You can use univariate procedure for any quantile value.

data t1;
   call streaminit(123);
   do i=1 to 100;
      x=rand('chisquare',2);
          output;
        end;
run;

proc means data=t1  noprint p25 p50 p75;
var x;
output out=q p25=x_p25 p50=x_p50 p75=x_p75;
run;

data _null_;
  set q;
  call symputx( 'x_p25',x_p25);
  call symputx( 'x_p50',x_p50);
  call symputx( 'x_p75',x_p75);
run;

%put >>>>p25=&x_p25 p50=&x_p50 p75=&x_p75<<<<;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群