CALL SYMPUT('tmpvar'||left(j),varname); output; end; %mend aa; %aa; run; You may want to add a trim function to varname to remove trailling blanks. SYMPUT puts the macro variable in the most local nonempty symbol table. The first time you run you macro, macro variables are create...
where ln(.) is the natural logarithm. The rationale for this formula is that ln(L0) plays a role analogous to the residual sum of squares in linear regression. Consequently, this formula corresponds to a proportional reduction in “error variance”. It’s sometimes referred to as a “pseudo...
if _n_ = 1 then call symput(); else stop; construct makes the data step create the macro variable in the first iteration of the data step (which happens to be when the first record of the dataset in the set; statement is read), and in the second iteration (where _n_ =...
id with a complete inline regex. This is done to demonstrate that the functions can be used either way. For more information you can consult the SAS documentation for the ‘PRX’ functions. REMOVING ‘20’ FROM ‘2011’ In the first case, the data had mixed entries for the year portion ...
Learn what a data rollup is and read about data rollup macro examples and case studies in this data mining tutorial from the book Data Mining: Know it All.