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
GSEM: Using a latent variable as an explanatory variable in the multinomial logistic regressionHi, Is it possible to use CFA outputs, latent variables, as explanatory (independent) variables in …
Plotting a subset of a sample (%) using a barchartHi, I am trying to plot the share of male smokers of the population against the 4 education categor…
logit and marginsDear All, I use the dataset margex and the command margins in order to replicate an example I saw i…
event study using GARCH and obtaining Cumulative abnormal volatilityDear statalisters, I am currently doing an event study to test the effect of terrorists events on t…
Different values (year of birth reported for the same individual - can Stata pick the value occuring most frequently (mode)Dear all, I'm working with a dataset with 24 different data waves. Not all individuals have informat…
Subscribe to:
Post Comments (Atom)
0 Response to Generate dummy variables
Post a Comment