Hi statalisters,
I want to use global macro's to refer to folder names, but ran into some unexpected behaviour when using them before the underscore "_" symbol.
Stata seems to ignore the macro that goes before the underscore.
*For example when i do this:
global year "2019"
global month "10"
di "$year_$month"
The console prints: "10" and ignores my call for year.
I want to get to "2019_10".
Could someone explain to me why the first macro gets ignored, and how i could solve it?
Thanks in advance!
Related Posts with Probem with using global macro in a string before an underscore
Generating random numbers without seedHi, I have an Excel template file that I want to fill with data generated by Stata 16. As I want to…
Repeated indicator approach using plssemDear Stata users, I am trying to apply the repeated indicators approach using plssem. I have two I…
Average (Mean) of previous quartersHello everyone, I have the following problem with my unbalanced monthly panel data, where "permno" …
Simple question about SEM postestimation command: estat residualsHello, I am using the SEM command (with maximum likelihood estimation) in Stata. I am wondering if…
Managing dates for Panel dataDear All, I have a monthly stock market for 4 countries(Country ID). When I am trying to change the …
Subscribe to:
Post Comments (Atom)
0 Response to Probem with using global macro in a string before an underscore
Post a Comment