楼主: xgnfly
5650 12

[原创博文] 如何对连续性数据x1、x2、x3分别根据其数值大小对其分组求各自频数分布。 [推广有奖]

11
xgnfly 发表于 2010-5-7 11:22:40
bobguy 发表于 2010-5-7 10:59
xgnfly 发表于 2010-5-7 09:43
bobguy 发表于 2010-5-7 08:55
xgnfly 发表于 2010-5-7 08:28
data a; input x1 x2 x3@@; cards; 80 12 120 60 5 156 56 6 250 56 15 350 58 23 360 77 35 450 40 25 359 65 18 368 56 6 250 56 15 350 58 23 360 77 35 450 40 25 359 45 16 389 66 18 400 ; run; 如何对连续性数据x1、x2、x3分别根据其数值大小对其分组求各自频数分布。


加@@
The histogram is what you want?
我想把柱形图对应的频数导入数据集,不想手工输入。
data a;
  input x1 x2 x3@@;
cards;
80 12 120 60 5 156 56 6 250 56 15 350
58 23 360 77 35 450 40 25 359 65 18 368
56 6 250 56 15 350 58 23 360 77 35 450
40 25 359 45 16 389 66 18 400
;
run;


Is this what you need?
proc freq noprint;
  tables x1 /nopercent out=x1;
  tables x2 /nopercent out=x2;
  tables x3 /nopercent out=x3;
run;

proc print data=x1;run;
proc print data=x2;run;
proc print data=x3;run;
不是简单的数个数,如X3希望能把359-368的个数加起来,即先分组再计数。

12
gzjb 发表于 2010-5-7 11:35:03
suggestion to lz:
1.gchart can't do this automatically.
2. design your our  groups(intervals by my understanding) and count the frequency of numbers  which locate in your interval
3. write the # of frequency of groups into a file
$. Done 2 and 3 in one data step

13
ljzhdyx@126.com 发表于 2011-4-19 12:52:03
楼上的说的是什么软件里面的操作?

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

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