全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2590 0
2012-03-08
最近在做岭回归的分析,想把SAS的结果以网页的形式输出并保存。我的程序如下:
data bodyfat;
infile 'C:\Users\Administrator\Desktop\CH07TA01.dat';
input skinfold thigh midarm fat;
run;
ODS HTML
body="D:/sas/body1.html"
contents="D:/sas/contents.html"
page="D:/sas/page1.html"
frame="D:/sas/frame1html";
proc print data = bodyfat;
run;
/* Original Regression */
proc reg data = bodyfat;
model fat = skinfold thigh midarm/ vif;
run;
/* Variables are highly correlated */
proc corr data = bodyfat noprob;
run;
title1 'Ridge Trace';
title2 'Body Fat Example';
symbol1 v = S i = none c = black;
symbol2 v = T i = none c = black;
proc reg data = bodyfat outvif
outest = bfout ridge = 0 to .03 by 0.002;/*表示K拟合范围为0到0.03*/
model fat = skinfold thigh midarm / noprint;
plot / ridgeplot nomodel nostat;
run;
title2 'Variance Inflation Factors';
proc gplot data = bfout;
plot (skinfold thigh midarm)* _RIDGE_ / overlay;
where _TYPE_ = 'RIDGEVIF';
run;
proc print data = bfout;
var _RIDGE_ skinfold thigh midarm;
where _TYPE_ = 'RIDGEVIF';
title2 'Parameter Estimates';
proc print data = bfout;
var _RIDGE_ _RMSE_ Intercept skinfold thigh midarm;
where _TYPE_ = 'RIDGE';
run;
ods html close;
ods listing;
结果是产生了网页格式的结果输出,但是所有的回归图形都无法显示。是不是我程序编辑出了问题呢?还请高手指导。
我的SAS是9.13版本滴哈。参考的文献是丁元林老师发表的文章:《SAS中网页格式输出的实现》!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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