全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3622 3
2015-09-23
各位大侠,

我自己写了一个barchart的template,但是跑程序老是有error,提示ERROR : Invalid byte 1 of 1-byte UTF-8 sequence ;但是我找不到原因,有没有哪位大侠对GTL 语句熟悉,帮我看看问题出在哪?程序在一楼和二楼,一楼是template程序,e二楼是数据集程序

二维码

扫码加我 拉你入群

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

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

全部回复
2015-9-23 12:05:17
所有程序见二楼
二维码

扫码加我 拉你入群

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

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

2015-9-23 12:07:11
data serum1;
    input group n1 percent1 n2 percent2;
    length cat $20.;
    if group=1 then cat="< 1.2";
    if group=2 then cat=">= 1.2 to < 2.02";
    if group=3 then cat=">= 2.02 to < 5.35";
    if group=4 then cat=">= 5.35";
    cards;
     1 13 60 4  20
     2 12 50 3  18
     3 16 75 8  40
     4 14 65 6  33
     ;
run;

proc template;
    define statgraph barchart;
    begingraph;
        layout lattice /rows=6 rowweights=(0.40 0.05 0.05 0.40 0.05 0.05);
            layout overlay/ yaxisopts=(linearopts=(tickvaluesequence=(increment=20 start=0 end=100) viewmin=0 viewmax=100)
                                   label="Trough Serum Sirukumab Concentration (&micro;g/mL) in Log-scale"
                                    labelattrs=(family="Times New Roman" size=10pt)
                                    tickvalueattrs=(family="Times New Roman" size=10pt))
                            xaxisopts=(display=(line ticks) label="Baseline CRP Level (mg/dL) in Sirukumab 50 mg q4w Group");
                barchart x=group y=percent1;
            endlayout;

            blockplot x=group block=n1/ valuefitpolicy=shrink label="n=   "
                                       display=(label values);

            blockplot x=group block=cat/ valuefitpolicy=shrink display=(values);

            layout overlay/yaxisopts=(linearopts=(tickvaluesequence=(increment=20 start=0 end=100) viewmin=0 viewmax=100)
                                   label="Trough Serum Sirukumab Concentration (&micro;g/mL) in Log-scale"
                                    labelattrs=(family="Times New Roman" size=10pt)
                                    tickvalueattrs=(family="Times New Roman" size=10pt))
                            xaxisopts=(display=(line ticks)) ;
                barchart x=group y=percent2;
            endlayout;

            blockplot x=group block=n2/ valuefitpolicy=shrink label="n=   "
                                       display=(label values);

            blockplot x=group block=cat/ valuefitpolicy=shrink display=(values);

        endlayout;
    endgraph;
    end;
run;

proc sgrender data=serum1 template=barchart;
run;
二维码

扫码加我 拉你入群

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

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

2015-9-24 11:29:24
找到问题所在了,原来是其中有特殊字符不能识别
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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