Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: STATA code for identifying similar observations within groupid


From   n j cox <n.j.cox@durham.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: STATA code for identifying similar observations within groupid
Date   Sun, 01 Jun 2008 18:05:35 +0100

Typo fix:

At least one country is in OECD:

You need a variable in_OECD, 1 for in OECD and O otherwise. Then

bysort pub_nbr (in_OECD) :
    gen byte any_in_OECD = in_OECD[_N] == 1

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index