Hi there, I am a student using SAS for a project. I used the macro code you listed here to try to draw a cubic spline curve for cox model with multiple covariates adjusted. For unknown reasons, it didn't work and showed the following error. The file "estimates" was correctly generated and can be opened. Could you help with troubleshooting, please? Thank you very much! "94 ods html select none; ERROR: The HTML destination is not active; no select/exclude lists are available. 95 96 ods rtf select none; ERROR: The RTF destination is not active; no select/exclude lists are available. 97 ....... 108 ods html select all; ERROR: The HTML destination is not active; no select/exclude lists are available. 109 110 ods rtf select all; ERROR: The RTF destination is not active; no select/exclude lists are available.". ******here are the codes I used *********** ods graphics on; PROC PHREG DATA = BB.omega3_cvd ; /* or other plots */ effect spl = spline(diet_avg / basis=tpf(noint) NATURALCUBIC details knotmethod=rangefractions(1, 1.4, 2.0) ); model PERMTH_INT*MORTSTAT(0) = spl RIDAGEYR RIAGENDR RIDRETH1 DMDEDUC2 DMDMARTL PIR dietenergyavg active smokestatus drinkstatus SDDSRVYR BMXBMI / rl=wald ties=EFRON ; store BB.coxr; run; %macro est(ref=1.4, start=0, end=20, by=0.1); %Do i = 1 %To %eval(%SysFunc( Ceil( %SysEvalF( ( &End - &Start ) / &By ) ) ) +1) ; %Let value=%SysEvalF( ( &Start - &By ) + ( &By * &I ) ) ; estimate "&value." spl [-1, &ref] [1, &value] / exp cl; %end; %mend est; ods html select none; ods rtf select none; ods dataset Estimates=Estimates; proc plm restore=BB.coxr; %est(ref=1.4, start=0, end=20, by=0.1); run; ods html select all; ods rtf select all; data estimates; set estimates; diet_avg=label*1; run; proc sgplot data=estimates NOAUTOLEGEND Noborder; Series y=ExpEstimate x=diet_avg / ; Series y=LowerExp x=diet_avg / LINEATTRS=(pattern=ShortDash color=Black THICKNESS=1); Series y=UpperExp x=diet_avg / LINEATTRS=(pattern=ShortDash color=Black THICKNESS=1); REFLINE 1 / axis=y; REFLINE 1.4 / Axis=X LINEATTRS=(pattern=ThinDot color=Black THICKNESS=1);; yaxis Values=(0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 3 4) Label="Hazard ratio" Type=LOG LABELATTRS=(weight=BOLD); xaxis min=0 VALUES=(0 to 20 by 1) LABELATTRS=(weight=BOLD); run;
... View more