Dear reader,
I tracked executives across firms and retained those individual executives who were employed for at least three years in each of at least two different firms. Although it is possible that teams of executives move from firm to firm, this should not happen in exactly the same years. These executives need to be dropped because this contains perfectly collinear executives. To make this more clear I added an example from Stata.
As you can see executives (3018 and 2972) moved from company A (1177) to company B (1500) in exactly the same year (2001). In my dataset, this might also occur for more than two executives at the same time. In case a team exists of 3 executives and 2 of the executives move to the same firm in the same year, then I still need to remove those 2 executives. Since I am interested in individual changes only. I am searching for a code to remove those teams of executives, satisfying the above condition.
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input long(GVKEY1 EXECID2) double YEAR
1164 607 1998
1164 607 1999
1164 607 2000
1164 607 2001
1164 18563 2002
1164 18563 2003
1164 18563 2004
1177 3018 1992
1177 3018 1993
1177 3018 1994
1177 3018 1995
1177 2972 1992
1177 2972 1993
1177 2972 1994
1177 2972 1995
1500 3018 2001
1500 3018 2002
1500 3018 2003
1500 3018 2004
1500 2972 2001
1500 2972 2002
1500 2972 2003
1500 2972 2004
Related Posts with Tracking changes in dataset with condition
Constraint function in optimize()Hello, I'm currently facing the following problem: I'm trying to minimize the variance of a portfol…
What estimation methods can endogenicity, heteroskedasticity, autocorrelation and fixed effects be solved without using GMM?Hello netizens of Stata forum. I have a panel of 13 countries and 8 years. I tried with the GMM but …
Ramsey Reset Test for single years vs whole data periodHi, I am running OLS regressions, firstly for 3 separate years (2006, 2010 and then 2015) and then …
Fama&MacBeth: xtfmb function. Time-fixed effectsHello statalisters, My case is that of an unbalanced panel data composed by 25,714 companies ("cusi…
Keeping mutliple observationsHello, I am currently working with a complete dataset with all firms in a country. However, I only …
Subscribe to:
Post Comments (Atom)
0 Response to Tracking changes in dataset with condition
Post a Comment