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
2-stage models for panel dataDear All, I am estimating the willingness to pay for insurance over 5 years, whereas the insurance …
global temporary dataset for interactive use in multiple DO fileI intend to use the `temp' file in multiple DO files, however, the file vanishes as the first do fil…
Hourly wage using Heckman correctionHey, i ran regression for estimating hourly wages: Y= β1x β2x β3x .... Y= monthly wage / hours wor…
Question on xtgee syntaxDear Statlist, I am trying to determine whether there is a difference in the success proportion bet…
Form monthly calendar portfoliosHello Stata forum: I want to make an event study for share repurchase announcements by using the ca…
Subscribe to:
Post Comments (Atom)
0 Response to Probem with using global macro in a string before an underscore
Post a Comment