楼主: dxystata
1140 1

如何将中位数放入macro中 [推广有奖]

版主

已卖:302份资源

大师

37%

还不是VIP/贵宾

-

TA的文库  其他...

Software

中英文Ebook

R学习

威望
2
论坛币
183395 个
通用积分
15333.1475
学术水平
208 点
热心指数
271 点
信用等级
174 点
经验
298627 点
帖子
5586
精华
1
在线时间
13632 小时
注册时间
2006-6-21
最后登录
2025-12-22

初级学术勋章 初级热心勋章 中级热心勋章 初级信用勋章

楼主
dxystata 发表于 2013-12-8 01:36:32 |AI写论文
50论坛币
  1. data a;
  2. input x;
  3. cards;
  4. 1
  5. 2
  6. 11
  7. 4
  8. 5
  9. 6
  10. 12
  11. 12
  12. 14
  13. ;
  14. run;
复制代码
如何将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( ...
关键词:Macro CRO acr Mac 中位数 中位数 如何

本帖被以下文库推荐

沙发
bobguy 发表于 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<<<<;

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 15:13