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]

st: Identify observations that appear in a list


From   R Zhang <[email protected]>
To   [email protected]
Subject   st: Identify observations that appear in a list
Date   Wed, 12 Mar 2014 22:12:35 -0400

Dear Statalisters,

I have the following data set (HAVE) (only provide a few observations
as illustration). The input variable gives the dollar input sold by
supplier to customer. You will notice that customer industry 4000B,
3000A also appear in SupplierIndustry. This indicates that some
industries can be both suppliers and customer.

+++++++++++++++++++++++

HAVE

CustomerIndustry           SupplierIndustry              Input

1000A    4000B    100

1000A    3000A    200

1000A    3000B    100

1000B    4000B    50

1000B    2000A    8

4000B    3000A    19

4000B    2000A    20

3000A    3000B    18

3000A    3000D    12

2000A    1000D    25

+++++++++++++++++++++++

I want to create a dataset that list all customer industries that are
also supplier industry, i.e., my output shall appear as :

CustomerIndustry           SupplierIndustry              Input

4000B    3000A    19

4000B    2000A    20

3000A    3000B    18

3000A    3000D    12

2000A    1000D    25

I am asking for your help on coding this.



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


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