You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
Hi all, I'm a newbie. I am working on a data set with over 500,000 string codes for one variable and decided to encode them (Using stata15) to numeric codes to keep their value labels That worked but now, when I want to keep a subset of the variable by value labels, I don't know how to do this. I tried
Keep if var = value label this got a = not allowed
keep if var = "value label"
keep if var =="value label" this got a mismatch error
So then I tried looking at destring but that's a different function
I tried using labmatch if var = "value label" thinking I might get the numeric value matched with the value labels I want but this came back with "something missing".
Not sure how to approach this as the data set is so large
Comment