Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: filter by value labels


From   <[email protected]>
To   <[email protected]>
Subject   Re: st: filter by value labels
Date   Thu, 31 Mar 2011 17:56:02 +0200

Thanks Nick,

this is the idea I was looking for but unfortunately it doesn’t fit to my example.


The use of  

"value_label_content":value_label_name 

is restricted to single values and their corresponding value labels where the latter must be known.

In my case value labels are unknown and I want to check and filter those containing defined substrings. 

In correction to my first post the command with non-encoded vars would be like that:
tab unitid if strmatch(firstname ,"*Joe*") == 1 & strmatch(firstname ,"Doe*") == 1 & strmatch(town ,"*Frankfurt*") == 1

(So "Joe" could have other names too, Frankfurt could be named "Stadt Frankfurt" or "Frankfurt am Main"...)
(The usual hassle with address data...)

There is none but if there was e.g. some function "vallabel" that would substitute variable values with their corresponding value labels (e.g. for comparison in -strmatch - ) I would encode more often and some of my datasets could be much smaller. 

Stefan Gawrich







*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index