%macro SmoothSelect(data); options nonotes; ods listing close; data temp; set &data(keep = Label1 nValue1 smoothingParameter where=(Label1 in ('Number of Observations', 'Residual Sum of Squares', 'Trace[L]' 'Equivalent Number of Parameters', 'Delta1', 'Delta2', 'Lookup Degrees of Freedom'))); run; proc transpose data=temp(drop=Label1) out=temp; by smoothingParameter; run; data temp(drop=_NAME_); set temp; rename Col1 = n Col2 = rss Col3 = traceL Col4 = delta1 Col5 = delta2 Col6 = nu1 Col7 = lkdf; data SmoothCriteria(keep = SmoothingParameter aicc1); set temp; sigmaHat=rss/n; aicc1=n*(log(sigmaHat) + (delta1/delta2)*(n+nu1)/(lkdf-2) ); proc sort data=SmoothCriteria(where=(aicc1^=.)) out=Aicc1Results; by aicc1; run; ods listing; proc print data=Aicc1Results(obs=1); title2 'Smoothing Parameter Minimizing the AICC1 Statistic'; id SmoothingParameter; run; proc sort data=Aicc1Results; by SmoothingParameter; run; title1 'AICC1 Criterion'; symbol1 c=black i=join value=none width=2; proc gplot data=SmoothCriteria; plot aicc1*SmoothingParameter/ hminor = 0 vminor = 0 vaxis = axis1 frame; axis1 label = ( r=0 a=90 ); run; quit; title1; %mend;