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
Logit models and stationery predictors*Do logit models require stationary predictors? …
What does inflate mean in a ZINB model?I am not sure what variable (predictor) to put in inflate( ) as I do not really understand the purpo…
do year effects in xtreg capture year effects for subpopulations?In some ways, this is more of a model-building question than a Stata question, but it is related to …
stuck on long to wide formatHello good people, I need help with this situation here. Please give it a look. Below is my data, …
New VariableHi, I want to create a new variable based on a year variable already within the dataset. The years i…
Subscribe to:
Post Comments (Atom)
0 Response to Global macro before strings
Post a Comment