Announcement

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

  • Computing percentiles

    Hello,

    I am trying to estimate percentile shares for income and wealth and do the histogram of wealth distribution by income. I tried using pshare command from Ben Jann that I found here:

    Code:
    pshare estimate wealth [aw=weight], p(10(10)90 95) pvar(income) density
    pshare histogram, yline(1)
    in order to obtain the figure as the one below:

    Click image for larger version

Name:	example .jpg
Views:	1
Size:	47.6 KB
ID:	1713741


    However, pshare command does not work with aweights. Do you know of another way to produce the figure?

    Thank you!



  • #2
    It is very very very rare that you need aweights. My prior is about 99.99999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 % (I could be off one or two 9s) that what you really want is pweights. In that somewhat likely case you can just use pshare
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Originally posted by Maarten Buis View Post
      It is very very very rare that you need aweights. My prior is about 99.99999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999999 % (I could be off one or two 9s) that what you really want is pweights. In that somewhat likely case you can just use pshare
      I do actually - I am working with SCF+ (Survey of Consumer Finances) dataset that was constructed by Kuhn et al. (2020). I was going through their replication files and they also used aweights - I am trying to obtain some further results so I wanted to produce this histogram.

      Comment


      • #4
        A quick look suggests to me that they should have used pweights
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Originally posted by Maarten Buis View Post
          A quick look suggests to me that they should have used pweights
          Thank you. I am not sure what the right weights to use are. When constructing the data, the authors also did the imputation of missing variables and imputed five values for each missing observation (e.g. business_equity in the data example below). Given that each individual is then represented five times, is it still fine to use pweights or they may need to be rescaled depending on what I want to compute?

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input double year str9 id double wgtI95W95 float(income business_equity)
          1949 "19490001"  .9987322315350646  55483.03 189821.06
          1949 "19490001"  .9987322315350646  55483.03  10321.75
          1949 "19490001"  .9987322315350646  55483.03  717922.2
          1949 "19490001"  .9987322315350646  55483.03 17419.074
          1949 "19490001"  .9987322315350646  55483.03  88968.34
          1949 "19490002" 1.1133562129916736  42315.05         0
          1949 "19490002" 1.1133562129916736  42315.05         0
          1949 "19490002" 1.1133562129916736  42315.05         0
          1949 "19490002" 1.1133562129916736  42315.05         0
          1949 "19490002" 1.1133562129916736  42315.05         0
          1949 "19490003" 1.1235737530466936  28666.23         0
          1949 "19490003" 1.1235737530466936  28666.23         0
          1949 "19490003" 1.1235737530466936  28666.23         0
          1949 "19490003" 1.1235737530466936  28666.23         0
          1949 "19490003" 1.1235737530466936  28666.23         0
          end

          Comment


          • #6
            That is a different problem. For that you need to use the mi commands, but I don't know how pshare interacts with mi
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Originally posted by Maarten Buis View Post
              That is a different problem. For that you need to use the mi commands, but I don't know how pshare interacts with mi
              Thank you very much for your help!

              Comment

              Working...
              X