Announcement

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

  • Computing standard errors for Erreygers index when using categorical variable for ranking

    Hello Experts,

    I have recently come across literature that advises calculating new standard errors for inequality indices when using categorical variable for ranking socio-economic welfare, which in my case is education. The link to the article (Concentration index - Countdown 2030) is
    http://chrome-extension://efaidnbmnn...tion_index.pdf
    (The forum link is not working at times, so pasting it directly too)
    HTML Code:
    chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://countdown2030.org/documents/Country_workshops/concentration_index.pdf
    In short, the substantial number of ties cause difficulties in fractional ranking and therefore unstable estimates of the concentration index. The authors advise using Newey-West regression estimator if using micro-data. Their Stata commands for outcome ‘hap’ are pasted below:
    Code:
    glcurve hap , glvar(glhap) sortvar(lnpcexp) pvar(incrnk)
    egen sdrnk = sd(incrnk)
    egen meany = mean(hap)
    genlhs=2*(sdrnk^2) * hap / meany
    newey lhs incrnk , lag(1) t(incrnk)
    I have tried the following using Stata 15.1:
    Code:
    conindex y if program==0, rankvar (mo_edu) erreygers bounded limits (0 1) cluster (id03) compare (survey)
                gen cie01=r(CI0)
                gen cie11=r(CI1)
    conindex y if program==1, rankvar (mo_edu) erreygers bounded limits (0 1) cluster (id03) compare (survey)
                gen cie02=r(CI0)
                gen cie12=r(CI1)
    
    bysort program survey id03:egen meany = mean(y)
    My commands provide me with Erreygers index (EI) and 'meany' but I still don't get the 'incrnk'. Also, 'newey' will require the dataset to be 'tsset'. I have realized that I am out of my depth here and would really appreciate your guidance in adopting the advised Stata commands for Erreygers index.

    My dataset is below
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double id03 float program byte mo_edu float(y survey)
    17 0  0 1 0
    10 0  8 1 0
    10 1  6 1 0
    18 1  0 1 0
    19 1  0 1 0
    10 1  3 1 0
     1 1  0 1 0
    10 1  5 1 0
     9 1  0 1 0
     2 1  0 1 0
    10 0  0 1 0
    10 1  0 1 0
    10 1  0 1 0
    19 0  0 0 0
    10 1  0 1 0
    10 0  0 1 0
     1 1  9 0 0
     6 0  0 0 0
    10 0  4 0 0
     9 1  7 1 0
    17 0  0 1 0
     4 1  0 0 0
    10 0  0 1 0
    17 0  0 0 0
     6 0  0 0 0
    17 0  0 0 0
    10 1  0 1 0
     1 1  0 0 0
     6 0  0 0 0
    11 1  0 1 0
    16 1 12 0 0
    10 0  0 1 0
    12 0  0 0 0
     7 1  0 1 0
    18 1  0 1 0
     6 0  0 1 0
    10 0  7 1 0
    10 0  0 1 0
    19 1  0 1 0
    19 1  0 1 0
    10 0  0 1 0
    12 1  0 1 0
    12 0  0 1 0
    18 0  0 1 0
     9 0  0 0 0
    19 1  3 0 0
     1 1  0 1 0
     1 1  6 1 0
    18 1  0 1 0
    11 0  0 0 0
    18 0 0 1 1
    17 0 0 1 1
    10 1 0 0 1
    15 0 4 0 1
    10 1 0 1 1
    19 1 0 1 1
    13 0 0 0 1
    10 0 6 1 1
    10 1 0 0 1
    12 0 0 1 1
    15 0 0 0 1
    19 1 6 1 1
     3 0 0 1 1
     6 0 0 0 1
    19 1 0 1 1
     8 1 0 1 1
     9 0 0 0 1
    12 0 0 1 1
     9 0 9 1 1
    10 0 0 1 1
    13 0 0 1 1
    19 0 0 1 1
    11 1 0 0 1
    10 0 0 1 1
     8 1 3 1 1
    11 0 0 1 1
     6 0 0 0 1
    19 1 1 1 1
     6 0 0 0 1
     6 0 0 0 1
     2 1 0 1 1
     2 1 0 1 1
    10 0 0 0 1
    10 1 2 0 1
    12 0 7 1 1
     6 0 0 1 1
     5 0 0 1 1
    15 0 0 1 1
    16 1 0 1 1
    10 1 0 1 1
    12 0 0 0 1
    15 0 7 0 1
    10 1 0 1 1
    12 1 0 1 1
     5 0 5 1 1
    17 0 0 1 1
     5 0 0 1 1
    10 0 3 1 1
    17 0 0 0 1
     6 0 0 1 1
    end
    label values id03 m1_q03
    label def m1_q03 1 "Oury", modify
    label def m1_q03 2 "Pa", modify
    label def m1_q03 4 "Siby", modify
    label def m1_q03 6 "Gassan", modify
    label def m1_q03 7 "Gossina", modify
    label def m1_q03 9 "Toma", modify
    label def m1_q03 10 "Yaba", modify
    label def m1_q03 11 "Yé", modify
    label def m1_q03 12 "Bama", modify
    label def m1_q03 3 "Pompoi", modify
    label def m1_q03 5 "Yaho", modify
    label def m1_q03 8 "Kougny", modify
    label def m1_q03 13 "Dandé", modify
    label def m1_q03 15 "Fo", modify
    label def m1_q03 16 "Koundougou", modify
    label def m1_q03 17 "Padema", modify
    label def m1_q03 18 "Léna", modify
    label def m1_q03 19 "Satiri", modify
    label def m1_q03 16 "Koundougou", modify
    label def m1_q03 17 "Padema", modify
    label def m1_q03 18 "Léna", modify
    label def m1_q03 19 "Satiri", modify
    Many thanks
    Deepali
    Deepali Godha

  • #2
    Hello Experts,

    I thought to use the ranking variable from glcurve with the logic that the ranking will be the same whether I compute EI or CI. I have used the following code (with Stata output) because I need standard errors for each sub-population.

    Code:
    keep if program==0 & survey==0
    glcurve y , glvar(glhap) sortvar(mo_edu) pvar(incrnk) 
    egen sdrnk00 = sd(incrnk) 
    bysort program survey id03:egen meany = mean(y) 
    gen lhs00=2*(sdrnk00^2) * y / meany 
    
    sort incrnk 
    
    gen time=_n
    
    tsset time
    time variable:  time, 1 to 23
    delta:  1 unit
    
    newey lhs00 incrnk , lag(1) 
    
    Regression with Newey-West standard errors    Number    of    obs     =    23
    maximum lag: 1    F(  1,        21) =    20.18
        Prob >    F    =    0.0002
    
                    
    Newey-West
    lhs00       Coef.   Std. Err.      t    P>t        [95% Conf.    Interval]
                    
    incrnk    .3776224   .0840654     4.49    0.000        .2027988    .552446
    _cons   -.0231073   .0428333    -0.54    0.595        -.112184    .0659693
    However, the CI is 0.378 versus the EI of .068 that I had computed using conindex. When I compute EI from the CI (EI=CI*4*meany) above it comes out to be .854 which is too high.

    Am I correct in my thinking that the above code (newey) cannot be used to compute SE for EI? Or, have I made some wrong assumptions?

    I will request your guidance on this.
    Thank you
    Deepali
    Deepali Godha

    Comment

    Working...
    X