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
droping multiple observationsMy data looks like the one below. and I want to delete the observations that dont have hhid (the thr…
How can I change the order of the bars in this bar graph?I am a beginner Stata user. For a research project, whose information I must unfortunately keep conf…
How can you make a by() bar graph plot side-by-side bars on one plot rather than two subfigures?I want to change the attached graph so that instead of appearing as two sub-figures, there is just o…
xtsccDears, I have question regarding XTSCC. As I read this can be used to deal with cross-section depen…
ytitle "unrecognized"Hi all, I've been trying to replicate a figure from code I got from the authors of a paper. When I …
Subscribe to:
Post Comments (Atom)
0 Response to Adding suffix or prefix to each element of a global varlist
Post a Comment