In the same vein, I have been looking for a less than brute force way
to drop individual value definitions for values which are no longer in
my data. For example, I have a data set that has literally thousands
of code descriptions that have been encoded. When I subsequently
-keep- only a few values, I still have all the parent dataset's values
defined which can represent a significant overhead in the resulting
dataset. I'd like to reduce the value definitions to only those that
still have corresponding values.
As I stated above, I can use a brute force approach of cycling through
individual label value definitions and dropping (-lab def mydef # "" ,
modify- where # is a value no longer in the dataset), but suspect
there is a more elegant way to do this.
DCE
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/