楼主: 08liurenxing
4295 27

[原创博文] 请教,sas列表 [推广有奖]

11
08liurenxing 发表于 2010-2-23 10:56:54
感激bobguy ,也感谢楼上,理解万岁啊!

12
08liurenxing 发表于 2010-2-23 10:57:51
昨天用excel的数据透视表凑合着算了一夜,今天试试高手指点的proc tabulate

13
soporaeternus 发表于 2010-2-23 10:58:49
excel的数据透视表和tabulate等价的呀......
Let them be hard, but never unjust

14
08liurenxing 发表于 2010-2-23 11:04:01
这不是为了学习sas吗,在应用中学习,加油加油

15
njmch 发表于 2010-2-23 11:49:36
楼主的学习精神值得学习 膜拜ing

16
fbns0819 发表于 2010-2-23 12:44:17
the follow code is easy to understand. you can run in your sas system to test.

data schdist;
input  school $ grade name $ gender $ ;
cards;
aaa 1 d1 f
aaa 1 i1 f
aaa 1 e1 m
aaa 2 d2 f
aaa 2 e2 m
bbb 1 g1 f
bbb 1 h1 m
bbb 2 g2 f
bbb 2 h2 m
bbb 2 k2 m
;
run;

proc tabulate data=schdist out=sch_2;
class school grade gender;
table school*(grade all) ,  (gender all=Total) *( n='N' pctn='%');
run;

17
fbns0819 发表于 2010-2-23 13:04:07
For beginner, the follow is easy understand. Nice day.

data schdist;
input  school $ grade name $ gender $ ;
cards;
aaa 1 d1 f
aaa 1 i1 f
aaa 1 e1 m
aaa 2 d2 f
aaa 2 e2 m
bbb 1 g1 f
bbb 1 h1 m
bbb 2 g2 f
bbb 2 h2 m
bbb 2 k2 m
;
run;

proc tabulate data=schdist out=out_sch;
class school grade gender;
table school*(grade all) all=Totall,  (gender all=Total_1) *( n='N' pctn='%');
run;

18
08liurenxing 发表于 2010-2-23 13:17:31
受教了,谢谢楼上

19
gue_1984 发表于 2010-2-24 08:41:38
学习下,各位辛苦了

20
xelloss1989 发表于 2010-2-24 10:11:04
9# bobguy

请问能解释下这一步吗?
proc tabulate data=tmp;
class     school     grade  gender;
table    (school *    grade)  all ,  (gender=' ' all) *( n='N' pctn='%');
run

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-3 08:05