全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1844 1
2007-08-24
You conducted a survey and the responses to the five questions were coded as A B C D E .A.Using the following eight lines of data,write a SASA data step to read these data and create five variables (QUES1,QUES2,QUES3,QUES4,QUES5)。Remember that these must all be charactered variables(since the values are letters)and there are no spaces between the values so you must use column input .Next ,generate frequency distributions for each of the five questions .omitting cumulative statistics from the listing .
The data is as follows

ABCDE

AACCE

BBBBB

CABDA

DDAAC

CABBB

EEBBB

ACACA

刚刚开始学习SAS。搞不懂怎末弄。
就是求A B C D E 的频率,但是不知道怎末用QUES1---QUES5表示,
这个题目建议是用COLUMN INPUT,具体应该怎末输入呢?
不要求COUMULATIVE SATISTICS,但是用到proc freq data=test 去不掉呢
thank you so much
二维码

扫码加我 拉你入群

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

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

全部回复
2007-8-25 00:57:00

here you go:

/** answer **/

data sv;
input @1 (ques1-ques5) ($char1.);
datalines;
ABCDE
AACCE
BBBBB
CABDA
DDAAC
CABBB
EEBBB
ACACA
;
run;

proc freq data=sv;
tables ques1-ques5/nocum;
run;

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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