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
Gravity model panel : xtpoisson, ppml, xtpqml, no results , help.Hello everyone Dear Joao Santos Silva I want to estimate a gravity equation on agricultural export…
Catplot - Varying Base & Intensity Colors Across Multiple GroupsHello, I am using catplot (thanks Nick for the great package) and I am trying to have 2 dimensions …
Compare the unexplained wage differential of the Blinder-Oaxaca decomposition between two groupsDear all, after using the Blinder-Oaxaca decompostion to decompose the African American/ White wage …
How to produce this type of graph?Hi, I saw this graph in an article and I wonder if it can be produced by Stata. Shamefully, I do no…
Unexpected omitted variablesHi, I have a question about unexpected omitted variables. When I run a regression with dummy variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Adding suffix or prefix to each element of a global varlist
Post a Comment