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
Negative lower confidence interval boundary for variance with nlcom after a multilevel logistic regressionHello, I am conducting a multilevel logistic regression to identify determinants of the availabilit…
How to graph difference in means between model 1 and model 2Hi Statalist, I will appreciate help with this problem. First, here is my data: Code: * Example g…
Joint modelling of binary longitudinal outcomes in using random effects approachHi everyone, I would like to jointly model two binary repeated outcomes in STATA using the random ef…
Long Data Format: Creating a New Variable with Values Conditional on Combination of Values of Other Variables Across Many ObservationsHello! I am stuck not knowing how to create a variable I need based on my current data. I have a l…
total dose per day with multiple dates and times Code: * Example generated by -dataex-. To install: ssc install dataex clear input int(date_daily_3…
Subscribe to:
Post Comments (Atom)
0 Response to Generate dummy variables
Post a Comment