Dear,
I would like to generate a new variable whose name includes a global macro in the middle of strings. An example is aaa_$var_bbb where aaa and bbb are random strings, respectively. I already defined $var (let's say, mmm) in the previous step.
So, I would like to refer "aaa_mmm_bbb" by using aaa_$var_bbb. But when I type aaa_$var_bbb, stata thinks that there is a macro, var_bbb not var. How can I figure this out?
Best,
Jae
Related Posts with Global macro before strings
Problem with count variable generationDear Statalist Users, Although I went through many related discussions and explanations about my qu…
How to write a while statement for the purpose detailed in the post?Dear all, I have two variables: seq1 and u. seq1 is a repeating sequence: 1,2,3,4,5 u is a random …
Problem with correcting a heteroskedasticity and serial correlation on panel data with fixed effectHello Statalists, I have a balanced panel data of 131 countries over 20 years with fixed effect (us…
Results of Logistic RegressionHi there, I tried to run a logistic regression, but it seems that my results does not seem to be cor…
How to create a categorical variable from a list?Hello members, I would like to seek your suggestion please on how best I can create a categorical v…
Subscribe to:
Post Comments (Atom)
0 Response to Global macro before strings
Post a Comment