displaysecondary = (ticks) 副坐标軸顯示哪些元素
linearopts = (thresholdmax = 1) 就是在坐标軸的末尾,再把坐标軸延長多少。
type = log
logopts = (
base = 2 坐标軸的刻度以基于 底數為2的對數,而不是根據資料刻畫坐标軸刻度。
tickintervalstyle = 以何種方式顯示刻度值
這幾個選項比較重要,可以 以相同的刻度間隔合理表示大|小資料
)
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiIn5GcuADOwYTNxYjMx0SO3QDM1kTM4EjNwATMxIDMy0SO1MjM1QTMvwFMxEjMwIzLclTNzITN0EzLcd2bsJ2Lc12bj5ycn9Gbi52YuAjMwIzZtl2Lc9CX6MHc0RHaiojIsJye.png)
/*--Fig_5_5_3 Most Frequend AE--*/
data GTL_GS_AE;
input ae $1-30 a b low mean high;
label a='Percent';
label b='Percent';
datalines;
ARTHRALGIA 1 3 1 7 48
NAUSIA 4 18 2 4 8
ANOREXIA 2 3 0.9 3.8 16
HEMATURIA 2 4 0.8 3.2 15
INSOMNIA 3 5.5 1.1 3.0 7
VOMITING 3.5 6 1.2 2.5 6
DYSPEPSIA 4 10 1.1 2.4 4.5
HEADACHE 7 10 0.8 1.1 2
BACK PAIN 5 6 0.8 1.04 2
COUGHING 8 8 0.5 1.0 2
MYALGEA 4 4 0.4 1.0 1.9
MELENA 4.5 4 0.4 0.9 2.2
RHINITIS 7 6 0.4 0.9 1.9
BRONCHITIS 5 3.5 0.3 0.7 2
CHEST PAIN 6 4 0.3 0.8 1.8
DYSPNEA 7 2.5 0.13 0.3 0.7
;
run;
proc sort data=GTL_GS_AE out=GTL_GS_AE;
by mean;
run;
data GTL_GS_AE_Ref;
set GTL_GS_AE;
if mod(_n_, 2) ne 0 then refae=ae;
run;
ods html;
proc template;
define statgraph _datalattice;
begingraph / designwidth = 8in designheight = 4in;
layout lattice / columns = 2 rowdatarange = union;
rowaxes;
rowaxis / display = (ticks tickvalues line)
tickvalueattrs = (size = 7);
endrowaxes;
layout overlay / xaxisopts = (displaysecondary = (ticks)
tickvalueattrs = (size = 7) linearopts = (thresholdmax = 1));
referenceline y = refae / lineattrs = (thickness = 14) datatransparency = 0.8;
scatterplot x = a y = ae / name = "a" legendlabel = "Drug A"
markerattrs = graphdata1(symbol = circlefilled size = 10);
scatterplot x = b y = ae / name = "b" legendlabel = "Drug B"
markerattrs = graphdata1(symbol = trianglefilled size = 5);
discretelegend "a" "b" / border = false valueattrs = (size = 5);
endlayout;
layout overlay / xaxisopts = (label = "Relative Risk with 95% CL" displaysecondary = (ticks)
tickvalueattrs = (size = 7) type = log logopts = (base = 2 viewmin = 0.125 viewmax = 64
tickintervalstyle = logexpand));
referenceline y = refae / lineattrs = (thickness = 16) datatransparency = 0.8;
scatterplot x = mean y = ae / xerrorlower = low xerrorupper = high markerattrs = (symbol = circlefilled size = 10);
referenceline x = 1 / lineattrs = graphdatadefault(pattern = shortdash);
endlayout;
endlayout;
endgraph;
end;
run;
proc sgrender data = GTL_GS_AE_Ref(obs = 10) template = _datalattice;
run;
本文來自部落格園,作者:Iving,轉載請注明原文連結:https://www.cnblogs.com/SAS-T/p/15371927.html