10 2021 档案

摘要:1. 双双引号保证路径绝对被正确执行。 data a;infile "dir /b "".\*.sas7bdat"" " pipe truncover;input a $ ;run; 第一个和最后一个双引号是一对 中间的四个就是双双引号 dir是列处来文件下的文件和文件夹信息,包括名字,大小,时间等 阅读全文
posted @ 2021-10-31 13:34 Iving 阅读(1124) 评论(0) 推荐(0)
摘要:说白了就是当文件中数据长度不够时,SAS如何处理这中情况。 FLOWOVER: 当文件中的数据长度不够长时,转到下一行读取,读完后,inputbuffer读入下一行新数据。 MISSOVER: 当文件中的数据长度不够长时,此变量为空。如果同时使用PAD,则不为空。 PAD: 当文件中的数据长度不够时 阅读全文
posted @ 2021-10-31 12:22 Iving 阅读(821) 评论(0) 推荐(0)
摘要:data class; set sashelp.class; level = '1'; run; option nodate nonumber; ods escapechar='^'; ods rtf file="./_1.rtf" contents toc_data; ods proclabel= 阅读全文
posted @ 2021-10-31 10:01 Iving 阅读(631) 评论(0) 推荐(0)
摘要:*drawtext和layout gridded中的entry都可以展示一段文本drawtext值是相当于找个地方写入文本,对布局没影响layout gridded中的entry会占据一部分布局空间 axistable 和blockplot都可以画出来数据,但blockplot不能用discrete 阅读全文
posted @ 2021-10-24 20:37 Iving 阅读(1544) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-10-23 21:56 Iving 阅读(0) 评论(0) 推荐(0)
摘要:在SCANTEXT = yes 前提下,PROC IMPORT是默认扫描前16行数据,所以后面过长的数据会出现截断。 guessingrows = MAX,最大为2147483647. 用2147483647行作为数据格式。 解决方法: 1. 修改注册表,因为SAS没办法该注册表,所以需要自己改 H 阅读全文
posted @ 2021-10-17 17:17 Iving 阅读(2196) 评论(0) 推荐(0)
摘要:xpace yspace 详见 SAS draw statement data cars; set sashelp.cars; cat1 = 'Improvemnt'; cat2 = 'Worsen'; if type = 'SUV' then typen = 1; else if type = ' 阅读全文
posted @ 2021-10-10 16:23 Iving 阅读(223) 评论(0) 推荐(0)
摘要:通过draw画矩形,文本,箭头等。 anchor = 矩形在坐标点的哪边。 drawspace = 相当于找一个基准点。是从figure最左下角作为基准点,还是坐标原点作为基准点,还是其它作为基准点。 draw中的 x = y = 并不是对应X Y轴上位置,而是基于上述基准点计算。 例如datape 阅读全文
posted @ 2021-10-07 16:34 Iving 阅读(361) 评论(0) 推荐(0)
摘要:第一部分:LEGENDITEM是自定义一个legend。 第二部分:LAYOUT LATTICE就是把画布分成了两列。ROWDATARANGE = union就是Y轴都是一个尺度。REVERSE = True从上到下,Y轴值依次增大 第三部分:画出左边的图形。tickValuePriority = 阅读全文
posted @ 2021-10-07 14:40 Iving 阅读(3035) 评论(0) 推荐(0)
摘要:第一部分:统一X轴,只用一个标准。DISPLAY = NONE啥也不显示了。COLORBANDS = ODD隔行换色 第二部分: filledoutlinedmarkers=true markerfillattrs=(color=gold) markeroutlineattrs=(color=bla 阅读全文
posted @ 2021-10-07 13:59 Iving 阅读(2612) 评论(0) 推荐(0)
摘要:Code大致由四部分组成 First Part: 把 SIDEBAR 区域分成两行四列,分别输入entry。这里默认 order = rowmajor,即先按水平方向填充entry。 siderbar区域啥意思,可参考SAS lattice_2中的图。 Second Part: 用SCATTERPL 阅读全文
posted @ 2021-10-07 13:13 Iving 阅读(2103) 评论(0) 推荐(0)
摘要:displaysecondary = (ticks) 副坐标轴显示哪些元素 linearopts = (thresholdmax = 1) 就是在坐标轴的末尾,再把坐标轴延长多少。 type = log logopts = ( base = 2 坐标轴的刻度以基于 底数为2的对数,而不是根据数据刻画 阅读全文
posted @ 2021-10-06 18:29 Iving 阅读(314) 评论(0) 推荐(0)
摘要:/*--Fig_5_5_2 LFT Lattice--*/ data GTL_GS_LFT_Lattice (keep=drug alat biltot alkph asat palat pbiltot palkph pasat visitnum); label alat="ALAT (/ULN)" 阅读全文
posted @ 2021-10-06 16:28 Iving 阅读(145) 评论(0) 推荐(0)
摘要:primary = True|False 一个layout中有多个plot时,指定一个作为primary。建立坐标轴刻度什么的 data GTL_GS_Labs_by_Week; label sgot="SGOT"; label aph="ALKPHOS"; label visit="Study W 阅读全文
posted @ 2021-10-06 16:18 Iving 阅读(110) 评论(0) 推荐(0)
摘要:gridded和lattice区别在于gridded一般用于structure一个table,展现统计量,这个table一般长宽较小。 和lattice功能相近,不支持common, uniform, external axes. layout gridded / rows = 3 columns 阅读全文
posted @ 2021-10-06 14:54 Iving 阅读(351) 评论(0) 推荐(0)
摘要:ods html;ods listing image_dpi = 300; ods graphics / reset noborder width = 9in height = 5.5in; proc template; define statgraph dist5; begingraph; tit 阅读全文
posted @ 2021-10-06 12:53 Iving 阅读(350) 评论(0) 推荐(0)
摘要:datapanel的轴label显示在水平方向正中间。 datalattice的轴的label显示在垂直方向正中间。 cellheightmin = num 指定行高度 columndatarange = union 根据columnvar中的值显示数据,不出现空的情况 columnweight = 阅读全文
posted @ 2021-10-06 12:16 Iving 阅读(440) 评论(0) 推荐(0)
摘要:rows = num 相当于用几个block来显示所有plots 可以使用INSET = (var1 var2)在cell中插入文本。SAS PROTOTYPE、SIDERBAR data GTL_GS_Labs; pi=constant('PI'); do Lab='Lab-1', 'Lab-2' 阅读全文
posted @ 2021-10-06 11:39 Iving 阅读(235) 评论(0) 推荐(0)
摘要:columndatarange = union 根据columnvar中的值显示数据,不出现空的情况 columnweight = proportional|equal 按比例分配columnvar宽度 headerlabeldisplay = value 显示columnvar的值 barlabe 阅读全文
posted @ 2021-10-06 11:18 Iving 阅读(404) 评论(0) 推荐(0)
摘要:walldisplay = (fill)不显示右|上坐标轴的线 viewmin = viewmax = 指定显示在plot中的值的范围 linearopts = () 坐标轴是数值型时,设置一些选项 tickvaluefitpolicy = 避免坐标轴冲突 ods trace on; ods out 阅读全文
posted @ 2021-10-06 10:12 Iving 阅读(447) 评论(0) 推荐(0)
摘要:x是timerisk。texttab是字符,例如Tim(Month), 100mg, Placebo。 legend展示: seriesplot是画出两条线,x y分别是坐标点 第一个scatterplot是画出统计量。lab全是统计量。 第二个scatterplot是画出点。 Stats展示:直接 阅读全文
posted @ 2021-10-05 23:02 Iving 阅读(261) 评论(0) 推荐(0)
摘要:/*--Fig 4.6.2 Heat map--*/ data GTL_GS_HeatmapParm; drop pi val; pi=constant('Pi'); do x=1 to 20; do y=1 to 10; value=sin(x*pi/10) + cos(y*pi/10); val 阅读全文
posted @ 2021-10-05 22:20 Iving 阅读(226) 评论(0) 推荐(0)
摘要:dropto = x 从某点向X轴作垂线 referenceline 参考线,水平或者垂直 ods html; proc template; define statgraph _referenceDropline; begingraph; layout overlay / xaxisopts = ( 阅读全文
posted @ 2021-10-05 22:12 Iving 阅读(807) 评论(0) 推荐(0)
摘要:ods html; proc template; define statgraph _ellipse; begingraph; layout overlay / xaxisopts = (griddisplay = on) yaxisopts = (griddisplay = on); ellips 阅读全文
posted @ 2021-10-05 22:01 Iving 阅读(57) 评论(0) 推荐(0)
摘要:ods html; proc template; define statgraph _pblineplot; begingraph; layout overlay / xaxisopts = (griddisplay = on) yaxisopts = (griddisplay = on); sca 阅读全文
posted @ 2021-10-05 21:58 Iving 阅读(95) 评论(0) 推荐(0)
摘要:loessplot 局部多项式拟合, ods html; proc template; define statgraph _loessplot; begingraph; layout overlay / xaxisopts = (griddisplay = on) yaxisopts = (grid 阅读全文
posted @ 2021-10-05 19:52 Iving 阅读(167) 评论(0) 推荐(0)
摘要:MODELBAND用来画置信区间的,只能和这三个plot一块使用。(LOESSPLOT, REGRESSIONPLOT, or PBSPLINEPLOT) ods html; proc template; define statgraph _regressionplot; begingraph; l 阅读全文
posted @ 2021-10-05 16:38 Iving 阅读(282) 评论(0) 推荐(0)
摘要:XAXISOPTS = (TYPE = time timeopts = (interval = month)) 指定使用坐标轴的类型,指定坐标轴的间隔 ods html; proc template; define statgraph _boxplot; begingraph; layout ove 阅读全文
posted @ 2021-10-05 15:50 Iving 阅读(217) 评论(0) 推荐(0)
摘要:就是比例分布图 ods html; proc template; define statgraph _histogram; begingraph; layout overlay; histogram mpg_city ; endlayout; endgraph; end; run; proc sgr 阅读全文
posted @ 2021-10-05 15:33 Iving 阅读(158) 评论(0) 推荐(0)
摘要:datatransparency = 0.4 透明度 ods html; proc template; define statgraph _linechart; begingraph; layout overlay / xaxisopts = (display = (ticks tickvalues 阅读全文
posted @ 2021-10-05 15:29 Iving 阅读(119) 评论(0) 推荐(0)
摘要:innermargin是用在layout overlay或prototype中,去定义一个block plot or axis table。 prototype是用在DATALATTICE|DATAPANEL中定义一个plot structure. /* Create a format for th 阅读全文
posted @ 2021-10-05 14:37 Iving 阅读(412) 评论(0) 推荐(0)
摘要:groupdisplay = 定义如何显示group,堆积、簇等等。 ods html; proc template; define statgraph _barchart; begingraph / ; entrytitle "a"; layout overlay / xaxisopts = (d 阅读全文
posted @ 2021-10-05 13:53 Iving 阅读(435) 评论(0) 推荐(0)
摘要:BREAK = TRUE|FALSE 数据中有缺失值时,是显示一条水平线还是空白 JUSTIFY= 数据点直接的连接方式。多使用center。 data GTL_GS_stepGroup; format Date Date9.; do i=0 to 334 by 40; date='01jan200 阅读全文
posted @ 2021-10-05 13:37 Iving 阅读(267) 评论(0) 推荐(0)
摘要:discretelegend ”name“ / halign = valign = location = border = across = 2 用几列来显示legend sortorder = 按什么顺序排列显示legend title = "" titleattrs = () ; 阅读全文
posted @ 2021-10-05 13:27 Iving 阅读(1242) 评论(0) 推荐(0)
摘要:layout ; plots / orient = horizontal group = 分组展示数据。就是方便不同组之间对比。 name = "name" 给DISCRETELEGEND提供一个名字。就是用来显示legend图例的。 legendlabel = ""定义显示在legend中的lab 阅读全文
posted @ 2021-10-05 12:40 Iving 阅读(923) 评论(0) 推荐(0)
摘要:从xorigin > x yorigin > y的合成向量 /*--4_2_9 Data Set VECTOR--*/ data GTL_GS_vector; format label 3.0; do i=1 to 10; x=ranuni(2); xo=x*(1+(ranuni(2)-0.5)); 阅读全文
posted @ 2021-10-05 12:38 Iving 阅读(169) 评论(0) 推荐(0)
摘要:data GTL_GS_SeriesGroup; format Date Date9.; do i=0 to 334 by 30; date='01jan2009'd+i; if mod (i, 30) =0 then freq=1; else freq=0; Drug='Drug A'; Val 阅读全文
posted @ 2021-10-05 12:34 Iving 阅读(292) 评论(0) 推荐(0)
摘要:ods html; *DATALABEL = ; proc template; define statgraph _scatter; begingraph; entrytitle "Weight by Height"; layout overlay/xaxisopts = (griddisplay 阅读全文
posted @ 2021-10-05 12:21 Iving 阅读(192) 评论(0) 推荐(0)
摘要:data GTL_GS_NeedleLabel; format Date Date9.;format a 4.3; do i=0 to 334 by 30; date='01jan2009'd+i; A = 16+ 3*sin(i/90+0.5) + 1*sin(3*i/90+0.7); outpu 阅读全文
posted @ 2021-10-05 12:20 Iving 阅读(128) 评论(0) 推荐(0)
摘要:DATASKIN: 控制plots的显示,看起来是否更光滑等。 ods html; proc template; define statgraph _bubbleplot; begingraph; layout overlay / xaxisopts = (griddisplay = on) yax 阅读全文
posted @ 2021-10-05 11:54 Iving 阅读(97) 评论(0) 推荐(0)
摘要:data GTL_GS_bandGroup; format Date Date9.; do i=0 to 334 by 1; date='01jan2009'd+i; if mod (i, 30) =0 then freq=1; else freq=0; Drug='Drug A'; Val = 1 阅读全文
posted @ 2021-10-05 11:48 Iving 阅读(284) 评论(0) 推荐(0)
摘要:COLUMNDATARANGE = : 设置X轴的刻度尺度,是基于各自的cell,还是各自的column,还是所有的column ROWDATARANGE = COLUMNWEIGHTS = ROWWEIGHTS = COLUMNGUTTER = ROWGUTTER = COLUMNAXES COL 阅读全文
posted @ 2021-10-04 20:15 Iving 阅读(296) 评论(0) 推荐(0)