Announcement

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

  • How to calculate the confidence interval of a median using replicate weights?

    I am analyzing Current Population Survey data using the replicate weights file provided by the Census Bureau for variance estimation. I am using the following SVY syntax to handle the replicate weights:

    svyset [iw=pwwgt0], sdrweight(pwwgt1-pwwgt160)

    I would like to calculate the median value of certain variables, and confidence intervals around the median. I cannot figure out how to do this using the SVY commands.

    I have searched the STATA listserve, and I did see a similar thread, and the SOMERSD and SCSOMERSD ado packages were suggested for a similar but not identical problem. (http://www.stata.com/statalist/archi.../msg00933.html) This package seems to permit the use of pweights and clustering when calculating confidence intervals around medians, but I don’t think they permit the use of replicate weights.

    Does anyone have any suggestions?

    Thank you very much,
    Rhiannon Patterson
    US Government Accountability Office
    701 Fifth Avenue, Suite 2700,
    Seattle, WA 98104

  • #2
    I don't think it's possible with built-in Stata commands. Instead, try epctile by Stas Kolenikov, available from SSC.

    http://www.stata.com/statalist/archi.../msg00146.html
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment


    • #3
      Thanks very much for that suggestion, David! I obtained Stas Kolenikov's epctile program, and it appears to work. I appreciate you pointing me to his program. I just need to figure out exactly what Stas Kolenikov did in his program, so I can feel comfortable using it. If you happen to know of any published papers that use his ado program, I'd love to have a look at them.

      I also communicated with Roger Newsom, who pointed me to his helpful rcentile wraparound program - this may be a useful program for other Stata users who need to calculate medians or other percentiles with pweights and clustering, although I believe it does not support other aspects of the SVY estimation procedures.

      Comment


      • #4
        Stas gives a reference for his methodology in the Help for epctile. It is:


        Francisco, C A, and Fuller, W A (1991). Quantile estimation with a complex
        survey design. The Annals of Statistics, 19 (1), 454--469.

        but a look inside epctile.ado shows that the method is that of:

        Woodruff, Ralph S. 1952. Confidence intervals for medians and other position measures. Journal of the American Statistical Association 47, no. 260: 635-646.


        Francisco and Fuller gave conditions which justify Woodruff's intervals.



        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #5
          Thank you, Steven.

          Comment


          • #6
            I am trying to load epctile on Stata 14.1 MP on a remote desktop system. When I type net and then click on the "e" directory I do not see -epctile-. I also don't see it on the repec website anymore. But when I try to find epctile on my own version of Stata/IC 13.1 I find it and install just fine.

            Has this command been removed? http://fmwww.bc.edu/repec/bocode/e/

            Or, is there a way someone could send to me the .ado file for this program to import to my remote desktop and manually install?

            Thank you!

            Comment


            • #7
              Try this:
              Code:
              . net describe epctile, from(http://staskolenikov.net/stata)
              
              ---------------------------------------------------------------------------------------------------------------------
              package epctile from http://staskolenikov.net/stata
              ---------------------------------------------------------------------------------------------------------------------
              
              TITLE
                    epctile -- estimation and inference for percentiles
              
              DESCRIPTION/AUTHOR(S)
                    
                    Author: Stas Kolenikov, skolenik at gmaildotcom
                    
                    epctile is an e-class version of pctiles that produces
                    standard errors in addition to point estimates,
                    including standard errors for complex survey data.
              
              INSTALLATION FILES                              (type net install epctile)
                    epctile.ado
                    epctile.sthlp
                    FormXLevels.ado
              ---------------------------------------------------------------------------------------------------------------------
              
              . net install epctile
              David Radwin
              Senior Researcher, California Competes
              californiacompetes.org
              Pronouns: He/Him

              Comment

              Working...
              X