I have a dataset like this
data have;
input ID Label;
datalines;
Factor_1 Assets
Factor_2 Liabilities
Factor_3 Bonds
;
run;
I'm looking to create a new dataset to accomodate a factor transformation and I will need to update my dictionary as such
data want;
input ID Label;
datalines;
Factor_1_log Assets_log
Factor_1_sq Assets_sq
Factor_2_log Liabilities_log
Factor_2_sq liabilities_sq
;
run;
I have tried this so far
data want;
set have;
by ID;
if first.ID then do;
output;
ID = ID||_log;
output;
ID = ID||_sq;
output;
end;
run;
But to no avail, is there a way to extend my list and append the correct phrase?