Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • CEO's Age

    Dear Stata Community,
    How can I calculate the CEO's age from the present age variable of Exececomp. The data period is 2009-2015.
    • co_per_rol is the CEO ID
    • gvkey is the company ID
    • year is the years
    Below is the data:
    input long gvkey int fyear long co_per_rol int present_age
    1380 2009 79 67
    1380 2010 79 67
    1380 2011 79 67
    1380 2012 79 67
    1380 2013 79 67
    1380 2014 79 67
    1380 2015 79 67
    1447 2009 111 69
    1447 2010 111 69
    1447 2011 111 69
    1447 2012 111 69
    1447 2013 111 69
    1447 2014 111 69
    1447 2015 111 69
    1602 2009 151 73
    1602 2010 151 73
    1602 2011 151 73
    1891 2009 231 74
    1891 2010 231 74
    1891 2011 231 74
    2393 2009 398 68
    2393 2010 398 68
    3226 2009 581 61
    3226 2010 581 61
    3226 2011 581 61
    3226 2012 581 61
    3226 2013 581 61
    3226 2014 581 61
    3226 2015 581 61
    3650 2009 700 73
    3650 2010 700 73
    3650 2011 700 73
    3964 2009 754 76
    3964 2010 754 76
    3964 2011 754 76
    3964 2012 754 76
    3964 2013 754 76
    3964 2014 754 76
    3964 2015 754 76
    4199 2009 836 70
    4199 2010 836 70
    4199 2011 836 70
    4199 2012 836 70
    4199 2013 836 70
    4199 2014 836 70
    4199 2015 836 70
    4598 2009 885 78
    4598 2010 885 78
    4598 2011 885 78
    4598 2012 885 78
    4598 2013 885 78
    4598 2014 885 78
    4598 2015 885 78
    5125 2009 1017 73
    5125 2010 1017 73
    5125 2011 1017 73
    5125 2012 1017 73
    5125 2013 1017 73
    5125 2014 1017 73
    5125 2015 1017 73
    5568 2009 1123 73
    5568 2010 1123 73
    5568 2011 1123 73
    5581 2009 1127 62
    5581 2010 1127 62
    5581 2011 1127 62
    5581 2012 1127 62
    5581 2013 1127 62
    6268 2009 1276 71
    6268 2010 1276 71
    6268 2011 1276 71
    6268 2012 1276 71
    6268 2013 1276 71
    6502 2009 1316 69
    6502 2010 1316 69
    6502 2011 1316 69
    6502 2012 1316 69
    6502 2013 1316 69
    6733 2009 1329 84
    6733 2010 1329 84
    6733 2011 1329 84
    6733 2012 1329 84
    6733 2013 1329 84
    6733 2014 1329 84
    6733 2015 1329 84
    7163 2009 1455 73
    7163 2010 1455 73
    7163 2011 1455 73
    7163 2012 1455 73
    7163 2013 1455 73
    7647 2009 1555 74
    7866 2012 1595 69
    7906 2009 1623 66
    7906 2010 1623 66
    7906 2011 1623 66
    7906 2012 1623 66
    7906 2013 1623 66
    7906 2014 1623 66
    7906 2015 1623 66
    7938 2009 1638 80
    end
    [/CODE]

  • #2
    Miral:
    you may want to try:
    Code:
    . bysort gvkey (fyear): gen CEO_cum_age= present_age+(fyear-fyear[1])
    . list if gvkey==1380
    
         +------------------------------------------------+
         | gvkey   fyear   co_per~l   presen~e   CEO_cu~e |
         |------------------------------------------------|
      1. |  1380    2009         79         67         67 |
      2. |  1380    2010         79         67         68 |
      3. |  1380    2011         79         67         69 |
      4. |  1380    2012         79         67         70 |
      5. |  1380    2013         79         67         71 |
         |------------------------------------------------|
      6. |  1380    2014         79         67         72 |
      7. |  1380    2015         79         67         73 |
         +------------------------------------------------+
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Assuming "present" means 2022 (it could be 2015, but it's not clear.)

      Code:
      gen wanted = present_age - (2022 - fyear)

      Comment


      • #4
        Execucomp has an Age variable that is calculated for every executive-year, so you do not have to construct anything.

        Comment


        • #5
          Thanks Ken Chui and @Carlo Lazzaro.

          Comment

          Working...
          X