Hi,

I need to create a new variable "ID" from a existing variable "Value", i have been trying with
. egen id = group(value)
but the new variable ID contain 1 for the first value, 2 for the second value, and so on. I need same resoults BUT numbered from 0 upwards.
"Value" is numeric

Thanks,