Hello,
I have a core set of variables and for each of them I generated several secondary variables. To keep my codes clean and short, I would like to define a global containing my core variables and then simply attach the relevant prefix or suffix.
My suffix is "_OP" and I would like to attach it to all the elements of the global list1
global list1 "x1 x2 x3 "
tabstat ${list1}_OP, s(co me p50 min max v) columns(statistics) save
Not sursprisingly, when running the code, Stata display "x1 ambigous abbreviation"
Thank you very much in advance for your help.
I have a core set of variables and for each of them I generated several secondary variables. To keep my codes clean and short, I would like to define a global containing my core variables and then simply attach the relevant prefix or suffix.
My suffix is "_OP" and I would like to attach it to all the elements of the global list1
global list1 "x1 x2 x3 "
tabstat ${list1}_OP, s(co me p50 min max v) columns(statistics) save
Not sursprisingly, when running the code, Stata display "x1 ambigous abbreviation"
Thank you very much in advance for your help.
Comment