it happens the following, I write for example:
Code:
use "db.dta" [...] gen year = start + delta
Then I realize I want to modify `start`.
So for example taking the log.
I then create a new variable and delete the old one, but I may forget to change the usage in later code.
So I end up with:
Code:
use "db.dta" gen start2 = log(start) drop start [...] * forgot to change here :( gen year = start + delta
Other languages (R, Python), would throw an error here: `start` is not defined.
But STATA "expands" the variable name and use `start2` instead of `start`.
How can I deactivate this feature and get an error if the variable is not defined?
0 Response to Disable variable expansion
Post a Comment