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
Could you please help with coding "mixed-effects model"?I'd like to ask for advice on coding the "mixed-effects model" to see the percent change in health b…
Specify e(title) to feed to etableWith the option `column(title)` etable is supposed to use the model titles as column headers: Code:…
Could you please help with coding "mixed-effects model"?n/a …
Disable variable expansionHi, it happens the following, I write for example: Code: use "db.dta" [...] gen year = start + de…
Save results of estat ptrends to fileHow can I save the result of `estat ptrends` and `estat granger` to file? I have tried with etable, …
Subscribe to:
Post Comments (Atom)
0 Response to Generate dummy variables
Post a Comment