Hello,
I have a question regarding the following:
My dataset is panel data, which includes the following:
- FirmID (which is the ID of each firm)
- Year (which are logically the years...)
- Prf (which are the profits)
What I want to do, is to delete the entire case (all observation for a firm, which is identified by FirmID), when a firm has at least one negative value for Prf.
My code looks like the following:
. bysort firmID (Prf) drop if Prf < 0
But it gives me an error, is there something wrong with my code? If so, can someone help?
I have a question regarding the following:
My dataset is panel data, which includes the following:
- FirmID (which is the ID of each firm)
- Year (which are logically the years...)
- Prf (which are the profits)
What I want to do, is to delete the entire case (all observation for a firm, which is identified by FirmID), when a firm has at least one negative value for Prf.
My code looks like the following:
. bysort firmID (Prf) drop if Prf < 0
But it gives me an error, is there something wrong with my code? If so, can someone help?
Comment