I have a dataset that lists all products sold in a one year period in two stores. The quantity sold is aggregated on a monthly basis. A product is normally observed many times. I want to drop all observations of products that are only sold in one of the stores. I only want to keep product_ID's that are sold in both stores. When it was sold is not a matter.
My key variables are month, product_ID, dummy variable Store.
If would be very happy if someone could help me.
Example data:
Month | Product_ID | Store
------------------------------------
1 | 1000 | 0
1 | 1000 | 0
2 | 1001 | 0
7 | 1002 | 0
8 | 1002 | 0
1 | 1000 | 1
1 | 1003 | 1
5 | 1001 | 1
5 | 1003 | 1
If this was my enitre data set I would like to drop all observartions of product_ID 1002 and 1003
My key variables are month, product_ID, dummy variable Store.
If would be very happy if someone could help me.
Example data:
Month | Product_ID | Store
------------------------------------
1 | 1000 | 0
1 | 1000 | 0
2 | 1001 | 0
7 | 1002 | 0
8 | 1002 | 0
1 | 1000 | 1
1 | 1003 | 1
5 | 1001 | 1
5 | 1003 | 1
If this was my enitre data set I would like to drop all observartions of product_ID 1002 and 1003
Comment