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
Overlapping histogramsHi everyone, I asked a Likert scale type of question to about 1,000 people, asking them to choose a…
Dropping rows that do not meet the follow up time cut offHi, I am working with a longitudinal data set. I am interested in keeping individuals in the data i…
Dropping rows that do not meet the follow up time cut offHi, I am working with a longitudinal data set. I am interested in keeping individuals in the data i…
Structural Equation Modelling (SEM)using STATAHi, I want to analyse my data with SEM using STATA. But i still confuse because there is no unobserv…
r 430Hi All, im trying to submit the following command: melogit newpromar LOForLoan i.ObsAccessfinn ResD…
Subscribe to:
Post Comments (Atom)
0 Response to Adding suffix or prefix to each element of a global varlist
Post a Comment