I intended to create a different value for each unique value of variable 1 and wrote
gen variable=group(variable1)
o know the correct way of doing it is with "egen" instead of "gen"
variable1 takes numeric values.
There are around 300 unique values of variable1
egen generates it correctly - values from 1 to 300.
but gen also generates it without promting any error - values from 1 to around 4800. there doesnt seem to be any recognizable pattern that i can tell how those values were created.
i am trying to figure out whether there is any system behind those values (incidentally results with those 4800 f.e. are much better than with 300).
Thanks for your help!
gen variable=group(variable1)
o know the correct way of doing it is with "egen" instead of "gen"
variable1 takes numeric values.
There are around 300 unique values of variable1
egen generates it correctly - values from 1 to 300.
but gen also generates it without promting any error - values from 1 to around 4800. there doesnt seem to be any recognizable pattern that i can tell how those values were created.
i am trying to figure out whether there is any system behind those values (incidentally results with those 4800 f.e. are much better than with 300).
Thanks for your help!

Comment