According to the manual https://www.stata.com/manuals/rml.pdf, ml accepts a model option group(varname) that specifies the group variable. (for example, the id variable in panel data). I wonder how to refer to this group variable name in the user-defined ml evaluator. I searched the manual but find no answers.

I am currently specifying the group variable as a second dependent variable in the equation and referring to it in the evaluator using the global $ML_y2. It works, but If there is a easier way I would happily adopt.

Thanks!