Dear Statalisters,
Below is part of my data, which includes fundid, manager name, gender, begin day, end day (the tenure of the manager in a particular fund), and year_month(the manager worked in the fund at the particular time).
I want to
1. drop the fundid manage by individual manager at year_month level;
2. create dummy that represents whether a team(fundid) have a female manager(1) or not(0) at a particular time period(year_month).
However, different team at every time period contains different number of managers and the manager turnover exists therefore I have no clue on this.
Please ignore the gender with N/A, I have to hand cleaning this part and have not finished yet.
Data
fundid managername male_0_female_1_notsure_NA begdate enddate year_month
FS00008L93 Amy Y. Zhang 1 3-Jan-12 1-Mar-15 2015m1
FS00008L93 Keith A. Lee 0 3-Jan-12 31-Dec-17 2015m1
FS00008L93 Andrew J. Fones 0 31-Dec-14 31-Dec-17 2015m1
FS00008L93 Damien L. Davis 0 31-Dec-13 31-Dec-17 2015m1
FS00008L93 Kempton M. Ingersol 0 3-Jan-12 31-Dec-17 2015m1
FS00008L93 Robert E. Hall 0 3-Jan-12 31-Dec-17 2015m1
FS00008L93 Robert E. Hall 0 3-Jan-12 31-Dec-17 2015m2
FS00008L93 Keith A. Lee 0 3-Jan-12 31-Dec-17 2015m2
FS00008L93 Amy Y. Zhang 1 3-Jan-12 1-Mar-15 2015m2
FS00008L93 Kempton M. Ingersol 0 3-Jan-12 31-Dec-17 2015m2
FS00008L93 Andrew J. Fones 0 31-Dec-14 31-Dec-17 2015m2
FS00008L93 Damien L. Davis 0 31-Dec-13 31-Dec-17 2015m2
FS00008L93 Andrew J. Fones 0 31-Dec-14 31-Dec-17 2015m3
FS00008L93 Kempton M. Ingersol 0 3-Jan-12 31-Dec-17 2015m3
FS00008L93 Damien L. Davis 0 31-Dec-13 31-Dec-17 2015m3
FS00008L93 Amy Y. Zhang 1 3-Jan-12 1-Mar-15 2015m3
FS00008L93 Robert E. Hall 0 3-Jan-12 31-Dec-17 2015m3
FS00008L93 Keith A. Lee 0 3-Jan-12 31-Dec-17 2015m3
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2017m10
FS00008LYU Menno Vermeulen N/A 10-Feb-14 31-Dec-17 2017m10
FS00008LYU Guy Lakonishok 0 1-Jul-14 31-Dec-17 2017m10
FS00008LYU Halvard Kvaale 0 3-Apr-17 31-Dec-17 2017m10
FS00008LYU Josef Lakonishok 0 10-Feb-14 31-Dec-17 2017m10
FS00008LYU John D. Schaeffer 0 1-Dec-14 31-Dec-17 2017m10
FS00008LYU James N. Mordy 0 3-Oct-11 31-Dec-17 2017m10
FS00008LYU Greg Sleight 0 1-Jul-14 31-Dec-17 2017m10
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2017m10
FS00008LYU Halvard Kvaale 0 3-Apr-17 31-Dec-17 2017m11
FS00008LYU James N. Mordy 0 3-Oct-11 31-Dec-17 2017m11
FS00008LYU Guy Lakonishok 0 1-Jul-14 31-Dec-17 2017m11
FS00008LYU Greg Sleight 0 1-Jul-14 31-Dec-17 2017m11
FS00008LYU Menno Vermeulen N/A 10-Feb-14 31-Dec-17 2017m11
FS00008LYU John D. Schaeffer 0 1-Dec-14 31-Dec-17 2017m11
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2017m11
FS00008LYU Josef Lakonishok 0 10-Feb-14 31-Dec-17 2017m11
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2017m11
FS00008LYU John D. Schaeffer 0 1-Dec-14 31-Dec-17 2017m12
FS00008LYU Menno Vermeulen N/A 10-Feb-14 31-Dec-17 2017m12
FS00008LYU Greg Sleight 0 1-Jul-14 31-Dec-17 2017m12
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2017m12
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2017m12
FS00008LYU Josef Lakonishok 0 10-Feb-14 31-Dec-17 2017m12
FS00008LYU Halvard Kvaale 0 3-Apr-17 31-Dec-17 2017m12
FS00008LYU Guy Lakonishok 0 1-Jul-14 31-Dec-17 2017m12
FS00008LYU James N. Mordy 0 3-Oct-11 31-Dec-17 2017m12
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2018m1
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2018m1
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2018m2
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2018m2
FS00008LYU Gregory J. Garabedian 0 31-Mar-18 31-Dec-17 2018m3
FS00008LYU Jody I. Hrazanek 1 3-Apr-17 11-May-18 2018m3
FS00008LYU Elaine F. Hahn 1 1-Dec-14 1-Jul-18 2018m3
Could anyone hlep?
Regards
Ulrica
Related Posts with Generate dummy variables
Question: Generating summary statistics table with tabstat and tableDear all, I have recently attempted to generate a descriptive statistic table with the command Co…
Imposing two parameter entries are equal in impact matrix for the SVAR commandI am trying to specify an IS curve in my impact matrix for my structural var. In my structural VAR, …
Time fixed effects as dummies change significanceDear Statalist, I am doing research on using nighttime light (radiances per area) to predict real re…
Fitting two lines using aaplotDear All, Is it possible to fit two lines (i.e. more than two variables) using the aaplot command? I…
Adding auxiliary variables in a modelGreetings, I am new to STATA. I would like to ask how to insert auxiliary variables in one of my st…
Subscribe to:
Post Comments (Atom)
0 Response to Generate dummy variables
Post a Comment