Announcement

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

  • Bootstrapping SEs for inequality indices

    Dear All,
    I applied Prof Jenkin's
    Code:
    prog define ineq, rclass
    1. ineqdeco rpce_04p [aw = wgt]
    2. ret scalar gini= $S_gini
    3. ret scalar ge0 = $S_i0
    4.end
    . preserve
    . drop if (missing(income) | income <= 0 | year != 1980 )
    
    
    bootstrap gini= r(gini) ge0 = r(ge0),  reps(250) cluster(hrn):ineq
    but no results. Instead I got an error message: unexpected end of file. Its very likely I have missed something. Please put me through.

    Thanks,
    Dapel

  • #2
    Thank you for using CODE delimiters; it helps legibility a lot. However, please also provide exactly what Stata gave back to you as well. It is unclear to me which file the error is referring to (the data file? -ineqdeco-?) If it is -ineqdeco-, perhaps there was a problem in your downloading of it. To be safe, I would ssc install ineqdeco, replace. Check also that you don't have duplicate copies of the program on your machine: which ineqdeco, all.

    By the way, SEs for the inequality indices can also be derived using linearisation methods: see svygei_svyatk (for Generalised Entropy and Atkinson indices) and svylorenz (for Gini). Both are on SSC

    Comment


    • #3
      PS: you are using old-style syntax to refer to saved results from ineqdeco. You should refer to r(gini) and r(ge0) in lines 2 and 3 of your program (rather than to the old style "S_*" macros). But, in fact, I don't know if you need those lines at all for a call to bootstrap

      Comment


      • #4
        Thank you for your post Prof Jenkins. after declaring the survey design for the dataset, is used
        Code:
        svyatk  income
        and but got the error message:
        data not set up for the old survey estimation commands; use svyset under version control or use the new svy prefix
        r(119).
        Also after installing and using the
        Code:
        svygei_svyatk income 
        , I got this error too:
        unrecognized command: svygei_svyatk
        Last edited by Zuhumnan Dapel; 29 Jan 2015, 10:48.

        Comment


        • #5
          Please read through the help files for all related programs before trying to do calculations. The error message for svyset is informative -- you have to do what it says. And there is an example of that in the ineqdeco help file that you've looked at. See also my 2006 NASUG presentation and material -- link provided in help files for ineqdeco and svylorenz. The same sources show clearly that svygei and svyatk are separate programs. (ssc describe svygei_svyatk would have shown you that too.)

          Comment


          • #6
            Thank you Prof. I have visited the help pages and been reading your 2006 NASUG (not just today) over and over again. However, I'm still stuck at this stage: .
            svyatk income
            data not set up for the old survey estimation commands; use svyset under version control or use the new svy prefix
            . I really don't know what the issue is. In order words, how do I the new svy or svyset under version control? Sorry to border you again.
            Code:
              which ineqdeco, all
            
            /Users/dapelz/Library/Application Support/Stata/ado/plus/i/ineqdeco.ado
            *! 2.0.2 SPJ May 2008 (fix bug arising if bygroup() and `touse' lead to no obs in a group)
            *!   bug fix method provided by Austin Nichols (many thanks!)
            *! 2.0.1 SPJ August 2006 (new vbles created as doubles)
            *! 2.0.0 SPJ August 2006 (port to Stata 8.2; additional saved results), 
            *!   with initial code rewriting contribution from Nick Cox (many thanks!)
            *! version 1.6 April 2001 (made compatible with Stata 7; SSC)
            *! version 1.0.1 Stephen P. Jenkins, April 1998   STB-48 sg104
            *! Inequality indices, with optional decomposition by population subgroups
            Last edited by Zuhumnan Dapel; 30 Jan 2015, 06:45.

            Comment


            • #7
              version #: svyset xxxxx I am unable to comment further (connection and other reasons)

              Comment


              • #8
                The new svy is precisely that documented as such in the Stata version you are using. There is an entire manual on this. I know that's a problem as well as a solution, but how I do use survey statistics is about as general a question as how do I do regression or graphics in Stata. I know that you are not deliberately asking that, but unless you sketch the details of your set-up you are not making your question specific.

                Disclaimer: my knowledge of survey is of measure zero.
                Last edited by Nick Cox; 30 Jan 2015, 08:03.

                Comment


                • #9
                  I've got there. Thanks a million! I used the
                  Code:
                   version 8.2: svyset [pw=popwt], strata(state) psu(eaname)
                  and then
                  Code:
                  svygei  income
                  One thing is left: how to do this by subgroup.
                  Last edited by Zuhumnan Dapel; 30 Jan 2015, 09:26.

                  Comment


                  • #10
                    Look at the subpop() option . For a paper following the Biewen-Jenkins one cited in the svygei and svyatk help, see Clarke and Roy in Empirical Economics 2012. I don't know if they have Stata code.

                    Comment


                    • #11
                      Thank you Prof. I was expecting the results to be displayed by the subgroup (e.g. by year if subpop(year))
                      Last edited by Zuhumnan Dapel; 31 Jan 2015, 13:56.

                      Comment


                      • #12
                        If that was your expectation, then you haven't read the help file carefully enough. You'll have to do the calculation for each year separately, e.g. with suitably-defined dummy variables identifying each year. [This is an old program. If rewritten today, it would probably have an over() option -- which is what you're hoping for.]

                        Comment


                        • #13
                          Thank you very much Prof. I've been offline on this forum in recent times.

                          Comment

                          Working...
                          X