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   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: filter by value labels
Date   Thu, 31 Mar 2011 13:04:13 +0100

I don't know you would expect a function to do this. Perhaps you mean
command. But is this what you want?

SJ-4-4  dm0009  . . . . . . .  Stata tip 14: Using value labels in expressions
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  K. Higbee
        Q4/04   SJ 4(4):488--489                                 (no commands)
        tips for using value labels in expressions

You can go straight to a .pdf by looking at

http://www.stata-journal.com/sjpdf.html?articlenum=dm0009

Nick

On Thu, Mar 31, 2011 at 11:15 AM,  <[email protected]> wrote:

> I have just copied the contents of a health database to Stata for analytic purposes.
> This de-normalization of the relational data structure leads to highly redundant data
> (e.g. 1000* the same hospital address).
>
> I frequently search for names and addresses to identify units (we only hold an internal unit ID, not known to data requesters)
> E.g.: Dr. John Doe from Frankfurt wants some information on his data.
>
> I could check:"tab unitid if firstname == "*John*" & lastname == "Doe" & town == "*Frankfurt*"
> If only one "unitid" results I could resume with the unitid
>
>
> To keep the dataset at a reasonable size I would like to store address data encoded.
> But is there any function that can identify cases by value labels instead of values?
> I don't know of any simple way (without too much extra scripting or data transformation).
*
*   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