I want to delete the selected variable dynamically from the macro variable that was set at the beginning.
I put the code for context, it won't run like this.
Imagine I start with the macro variable having the value : var1 var2 var3 var4
Now I select var2 from the glmselect and I want to withdraw it form the macro variable so that it becomes : var1 var3 var4.
data matched;
format _from _to $32. r2 8.3;
output;
run;
data matched;
set matched(obs=0);
run;
proc sql;
select name into :vary separated by ' '
from nok where type=1;
quit;
%put &vary.;
data _null_;
set WORK.NAMY_OK(obs=10 where=(type=1 and ^index(lowcase(name), 'var') ));
call execute ('
ods output ModelInfo=model SelectionSummary=selsum;
proc glmselect data=public.ttt ;
model ' || name || ' = &vary. / selection=stepwise( stop=1 ) noint;
run;
proc sql;
select tranwrd("&vary.", strip(EffectEntered),"") into :vary
from WORK.SELSUM;
quit;
%put &vary.;
proc sql;
insert into matched(_from, _to, r2 )
select ' || quote(name) || ', strip(EffectEntered), RSquare
from WORK.SELSUM;
quit;');
run;
... View more