/*----------------------------------------------------------------------------- Macro exinc Author : Carolina Meier-Hirmer (cmh@fdm.uni-freiburg.de) Version : 1.0 (13.05.02) Subject : Extracting covariate names for labelling the results (for the linear included covariates) Arguments : namen = string containing all included variables n = number of included covariables se = output contains also labelling for the SE Example : Included: age nodes %let xinclude=age nodes; * Use of macro exinc; %exinc(&xinclude, 2, 0); * Output INC1="age" INC2="nodes" * Use of macro exlab; %exinc(&xinclude, 2, 1); * Output INC1="age" SEINC1="AGE(SE)" INC2="Nodes" SEINC2="Nodes(SE)" -----------------------------------------------------------------------------*/ %macro exinc(namen, n, se); %local j vari; %let exinc=; %do j=1 %to &n; %let vari=%qscan(&namen, &j,%str( )); %let exinc=&exinc inc&j="&vari"; %if &se=1 %then %let exinc=&exinc seinc&j="&vari(SE)"; %end; &exinc %mend;