|
Data defines the model by dint of genetic programming, producing the best decile table.
|
|
SAS Code For Running Medians of Three Bruce Ratner, PhD |
|
 /** data assumed to be equidistant, e.g., from a time series **/
data IN; input X1 - X10; cards; 23 45 36 57 89 19 29 44 33 56 ; run; proc print; title2 ' dataset IN '; run;
data Medians_of_3; set IN; array d{*} X1-X10; array med [10] med1 - med10; array smmed[10] smmed1 - smmed10; do i=1 to dim(d); med{i}=.; if i <=dim(d)-2 then do; med{i} = median(d{i},d{i+1},d{i+2}); smmed(i+1) = med(i); end; end; smmed(1) = median( d(2), d(3), (3*d(2) -2*d(3)) ); smmed(dim(d))= median( d(dim(d)), d(dim(d)-1), (3*d(dim(d)-1) -2*d(dim(d))) ); drop i j; run; proc print;var smmed1-smmed10; title2 ' Smooth Sequence of Xs '; run;
|
For more information about this article, call Bruce Ratner at 516.791.3544 or 1 800 DM STAT-1; or e-mail at br@dmstat1.com. |
Sign-up for a free GenIQ webcast: Click here. |
|
|