全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
6762 4
2019-06-05
悬赏 15 个论坛币 未解决
ods listing close;                                                                                                                     
ods rtf file= "D:\大三\SAS\second\a.rtf" style = journal ;    /*表格导出成rtf文件*/                                                     
options formchar="|____|+|___+=|-/\<>*" ;                     /*定义output的字符格式,保证电脑之间跑出output效果的一致性*/              
proc report data=outr2 headline headskip nocenter nowd;                                                                                 
column ('--' y1 y2 y3 y4 y5);                                                                                                           
title '三因子模型:市场因子、规模因子SMB、价值因子HML';                                                                                 
title2 ' Adjusted R-square';                                                                                                            
define y1/display format=6.4 width=10 'HML1';                                                                                          
define y2/display format=6.4 width=10 'HML2';                                                                                          
define y3/display format=6.4 width=10 'HML3';                                                                                          
define y4/display format=6.4 width=10 'HML4';                                                                                          
define y5/display format=6.4 width=10 'HML5';                                                                                          
compute after;                                                                                                                          
line '';                                                                                                                                
line @3 60*'_';     /*从第三列开始画48个短横线,最后达到一条直线的效果*/                                                               
endcomp;                                                                                                                                
run;                                                                                                                                    
ods rtf close;                                                                                                                          
ods listing;      

上面的代码将outr2数据集中5x5数据集输出到如图表格,但是缺少行标题,请问如何加上行标题“SMB1” “SMB2”“SMB3”“SMB4”“SMB5”.
另外请问如何让标题居中
恳请大佬赐教!                        

二维码

扫码加我 拉你入群

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

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

全部回复
2019-6-5 09:32:05
这个是截图
附件列表
三线表.png

原图尺寸 119.75 KB

三线表.png

二维码

扫码加我 拉你入群

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

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

2020-3-4 20:39:15
可以在proc report data=outr2 headline headskip nocenter nowd 后用STYLE<(location(s))>=<style-override(s)>

如(标题为Table 1):proc report data=outr2 headline headskip nocenter nowd
                              style(report)={pretext="Table 1" just=center font=("arial",12pt, bold) frame=hsides rules=groups};  
二维码

扫码加我 拉你入群

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

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

2020-3-4 20:39:58
可以在proc report data=outr2 headline headskip nocenter nowd 后用STYLE<(location(s))>=<style-override(s)>

如(标题为Table 1):proc report data=outr2 headline headskip nocenter nowd
                              style(report)={pretext="Table 1" just=center font=("arial",12pt, bold) frame=hsides rules=groups};  
二维码

扫码加我 拉你入群

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

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

2020-3-4 21:18:26
删去 headskip nocenter 选项即可
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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