Encoding string variables with more than 65,536 unique values

50 views
Skip to first unread message

anneg...@gmail.com

unread,
Feb 14, 2014, 12:11:51 PM2/14/14
to stata-us...@googlegroups.com
I am trying to encode a variable with 151,000+ unique values which STATA won't do because the default limit is 65,000+ !  Does anyone know if there is any way of increasing this limit?
 
I would like to avoid having to do this in batches and then 'append' back together if possible, as below this 151,000+ variable lies a further variable with more values!
 
Any suggestions much appreciated.

J

unread,
Feb 14, 2014, 12:48:17 PM2/14/14
to stata-us...@googlegroups.com
Can you explain why you want to encode a variable with 151K values?

J

J

unread,
Feb 14, 2014, 3:09:44 PM2/14/14
to stata-us...@googlegroups.com
If you are assigning unique IDs by postcode, you don't want to use encode. Encode is for replacing long string values with short numeric values. Use bysort on postcode with egen.

J
Reply all
Reply to author
Forward
0 new messages