Data defines the model by dint of genetic programming, producing the best decile table.


SAS Code for Determining the Number of Variables in a Dataset
Bruce Ratner, PhD
Live chat by Boldchat
Live chat by Boldchat

Number_of_Var_Dataset
* This code automatically determines the number of variables in a dataset
 (and renames original vars b, c, and d to X2, X3, and X4);
data
varnames;
input Resp b c d;
cards;
1 2 3 4 5
23 45 67 8 9
34 5 6 7 8 7
;
run;

proc sql;
select count(name) into :ct
from dictionary.columns
where libname = 'WORK' and memname = 'VARNAMES'
and type = 'num';
quit;

%let ct = &ct;

data varsX;
set varnames;
array VARS (*) _numeric_;
array XVARS (*) Resp X2 - X&ct;
do i = 1 to dim(vars);
Xvars(i) = vars(i);
drop i;
end;
run;

proc print data=varsX;
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.