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
Reshaping Long Data IssueI am trying to collapse this data but I have continuously gotten errors regarding the i and j not be…
finding keywords in string variablesDear Statalister I'm working on a dataset and I need to create a dummy variable equals 1 if the str…
Using svy command with graph commandDear all, I am trying to use graph in Stata 16 to plot bars of the means of categorical variables (…
Using svy with graphDear all, I am trying to use graph in Stata 16 to plot bars of the means of categorical variables (…
Bootstrapped CI for effect size for one sample t-testHello, I need to test if across a series of studies, the mean response is significantly different f…
Subscribe to:
Post Comments (Atom)
0 Response to Global macro before strings
Post a Comment