全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3535 2
2013-06-18
我的CODE如下

proc reg data=table2;
model daysofTm90=centeryear year3  /clb;
output out=model_set p=yfit;
run ;
title 'regression analysis for degree=3 ';
proc gplot data=model_set;
plot daysofTm90*year yfit*year/overlay;
symbol1 v=star c=blue I=none;
symbol2 v=none c=red I=spline;
run;

我要在画出的曲线上加上95%置信区间阴影,CODE该怎么改啊。谢谢
二维码

扫码加我 拉你入群

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

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

全部回复
2013-6-18 14:55:40
proc sgplot data=sashelp.classfit;
  title "Fit and Confidence Band from Precomputed Data";
  band x=height lower=lower upper=upper /
       legendlabel="95% CLI" name="band1";
二维码

扫码加我 拉你入群

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

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

2013-6-19 11:43:34
hamsik11 发表于 2013-6-18 14:55
proc sgplot data=sashelp.classfit;
  title "Fit and Confidence Band from Precomputed Data";
  band ...
1117     proc tpspline data=model_set;
1118        model daysofTm90=centeryear year3/alpha = 0.05;
1119        output out =result pred uclm lclm;
1120     run;

ERROR: At least one smoothing variable is required. If you only want to fit a parametric model,
       you can use PROC GLM or PROC REG.
NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.RESULT may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
WARNING: Data set WORK.RESULT was not replaced because this step was stopped.


NOTE: PROCEDURE TPSPLINE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

1121
1122
1123   ods graphics on;
1124


1125     proc sgplot data=result;
1126        title "polynomial regression for Tm90";
1127
1128        xaxis label="year";
1129        yaxis label="days of Tm90";
1130
1131        band x=year lower=lclm_daysofTm90 upper=uclm_daysofTm90/name="range"
ERROR: Variable LCLM_DAYSOFTM90 not found.
ERROR: Variable UCLM_DAYSOFTM90 not found.
1132                    legendlabel="95% CI of Predicted daysofTm90";
1133        scatter x=year y=daysofTm90/name="obs" legendlabel="daysofTm90";
ERROR: Variable DAYSOFTM90 not found.
1134        series x=year y=p_daysofTm90/name="pred"
ERROR: Variable P_DAYSOFTM90 not found.
1135                    legendlabel="predicted values of daysofTm90"
1136                    lineattrs=graphfit(thickness=1px);
1137
1138        discretelegend "range" "obs" "pred";
1139     run;

我用了这些,log 出现错误怎么回事情啊,求高人指点
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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