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.
Related Posts with Adding suffix or prefix to each element of a global varlist
Syntax error on "or" commandDear Madam/Sir, I am new to STATA programming. After searching several posts, I make the following …
Does "reverse" retain as official word?Dear Stata users, I installed a community contributed command -revrs- (SSC) written by Kyle Longest…
Including additional interaction fixed effects wHi Statalist, I just joined the community and I would like to ask a question that I couldn’t solve …
Accessing the coefficient estimate in a threshold regressionHi, I need your help. When we run a simple regression, we may access the coefficient by typing Cod…
Including additional interaction fixed effects in a two way fixed effect modelHi Statalist, I just joined the community and I would like to ask a question that I couldn’t solve …
Subscribe to:
Post Comments (Atom)
0 Response to Adding suffix or prefix to each element of a global varlist
Post a Comment