hello everyone,
could anyone help me to find an appropriate command for the following condition:
I have dummy variables zero and one, I want to drop firms that have not dummy variable one in all year.
for example, I have the following dataset
id year dummy
1 2000 1
1 2001 1
1 2002 0
1 2003 0
1 2004 0
1 2005 1
2 2000 0
2 2001 0
2 2002 0
2 2003 0
2 2004 0
3 20050
So I want to keep id 1 because there is dummy variable one in some years and I want to drop id 2 because all years have dummy zero and so on.
Could anyone help me to find the command?
Comment