Closed adamreir closed 2 years ago
@adamreir I put that warning there to make it plain this was not parsed in the same way as by varlist: egen
(i.e. it's parsed by creating the temporary variable first). However, I forgot about this Stata quirk with strings, which has gotten me many times over the years. You can replace lines 646 and 647 in egen.ado
with
mata printf("{bf:warning}: gegen is {bf:NOT} parsing the expression '%s' by group.\n", st_local("args"))
mata printf("To parse this expression by group, call gegen using the -by:- prefix.\n")
or delete them if you understand the warning.
Oh, right. I didn't consider the possibility the bug was in the error message and not in the parsing. That does fix the issue.
Thanx again!
I just updated gtools to version 1.8.1, and some code that used to work now issues an error message.
The command
Now gives the error message
Here is a minimal example that produces the error:
I've managed to circumvent the problem by creating a temporary variable and evaluating that in egen max. But if it indicates some more significant issue I thought you should know.
(and since I'm here: thanks for making this awesome package)
Version info