Announcement

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

  • #16
    @ Nick Cox
    sir i want to calculate Aggregate earnings quality measure, and i want to follow this methodology
    "To compute the aggregate earnings quality measure, EQ, we start by ranking firms on a scale from zero to 100, according to each of the three individual measures of earnings quality ( RELEV, TIMEL, and CONSER). We compute the aggregate earnings quality measure for each firm by averaging its rankings for the three individual measures. Higher rankings indicate higher levels of earnings quality."
    sir which command is ok for my case
    Code:
    . egen wanted = xtile(EQ), by(year) nq(100)
    
    OR
    . by year, sort: egen n = count(EQ)
    . by year: egen i = rank(EQ), track
    . gen pcrank = (i - 1) / (n - 1)
    gen pcrank_percnetage = pcrank*100  



    my cacluation results:
    Code:
    code       year        EQ        wanted         n           i              pcrank               pcrank_perc
    600739     2008       30          1             716          1              0                        0
    600505     2008       35.75       1             716          2              0.001399           0.13986
    600624     2008       619.25      100           716        716            1                        100
    615        2009       60.75       1             795         1              0                        0
    600505     2009       68.5        1             795         2             0.001259           0.125945
    600263     2009       725.75     100            795         795            1                        100

    or both are the same?
    Looking forward for your suggestions.
    Best regards.
    Last edited by Ayub UOM; 06 Aug 2019, 23:48.

    Comment

    Working...
    X