由买买提看人间百态

topics

全部话题 - 话题: scorefmt
(共0页)
c*****7
发帖数: 54
1
来自主题: Statistics版 - SAS里关于recode一问
我还是有两个疑问噢,
你说不可以省略如下这一段:
PROC FREQ DATA = GRADES;
TITLE 'Example 3';
TABLE SCORE;
FORMAT SCORE SCOREFMT.;
RUN;
第一个问题:我没看出来改前和改后的这两段有什么本质区别啊,没看出来第一个是对于
整数啊,
改前:
PROC FORMAT
VALUE SCOREFMT 0-64 = 'Fail'
65-69 = 'Low Pass'
70-79 = 'Pass'
80-89 = 'High Pass'
90-HIGH = 'Honors';
RUN;
改后:
PROC FORMAT
VALUE SCOREFMT 0-<65 = 'Fail';
65-<70 = 'Low Pass'
70-<80 = 'Pass'
80-<90 = 'High Pass'
90-HIGH = 'Honors';
RUN;
第二个问题:
FORMAT SCORE SCOREFMT.
你说FORMAT后面都要加点,比如FORMAT DOB MMDDYY8.;这里8后面之所以加点是因为规定
字符的长度吧?可
c*****7
发帖数: 54
2
来自主题: Statistics版 - SAS里关于recode一问
学生考试分数recode:
PROC FORMAT
VALUE SCOREFMT 0-64 = 'Fail'
65-69 = 'Low Pass'
70-79 = 'Pass'
80-89 = 'High Pass'
90-HIGH = 'Honors';
RUN;
PROC FREQ DATA = GRADES;
TITLE 'Example 3';
TABLE SCORE;
FORMAT SCORE SCOREFMT.;
RUN;
书上说If the scores were not integers, you could rewrite the PROC FORMAT
statements like this:
PROC FORMAT
VALUE SCOREFMT 0-<65 = 'Fail';
65-<70 = 'Low Pass'
(共0页)