Announcement

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

  • How does Stata calculate SE of proportions with weights?

    Hello Statalist people


    I've been lurking here for over a decade. Rarely a week has gone by where I don't lean on Statalist so a big thank you to the people posting high quality information on stats list. I am standing on your shoulders on a weekly basis. Today I come with a question I can not find an answer to with search.

    For work we are using tableau for a dashboard for non technical researchers. We are looking at disabled people in the American Community Survey (ACS). We want to be able to look at small subsamples like native americans in a specific state. We can produce weighted proportions but we want to compute SEs on the estimates so we can make CVs and censor information that is not reliable within the framework of the ACS manuals.

    The stata help file for the proportion command lists the SE formula but not what is used when you use weights. I've been frustrated that most books on the subject tell you the formula used. I've found information in sampling design text books from the 70s when metrics people had to be philosopher kings to do research in general purpose programming software. I've implemented to formulas in tableau. it's shockingly fast doing this with millions of person level observations in the ACS even with weights.

    So my question to all you philosopher kings is do you know the formula stata uses with weights or know what books I should be reading? Additionally I would love advice and guidance on how to approach these problems in the future to find this information on my own.

    Thanks in advance.
    Owner of StataTutor.com

  • #2
    if I understand you correctly, this is given on p. 2233 of the r.pdf file; you can easily get there from the help file by clicking on the link on the top and then on "methods and formulas" and scroll down go to the "Survey data and sampling weights" section

    Comment


    • #3
      Also look at 199 here
      HTML Code:
      https://www.stata.com/manuals/svy.pdf

      Comment


      • #4
        Wow, First up thanks for the swift advice this is great. I've tried both the taylor expansion and the effective sample size method previously and couldn't replicate the results. Clearly I'm doing something wrong. I need to do each of these by hand with different software to figure out what I am getting wrong.

        Thanks so much everyone! I'm looking forward to moving forward with this.
        Owner of StataTutor.com

        Comment


        • #5
          You could also look through the command's ado file. It is likely that the command calls other commands, in which case you would need to look through several ado files. However, not all of Stata's program files are publicly accessible.

          Code:
          viewsource _svy_summarize.ado

          Comment


          • #6
            I suspect there may be several ways to make such a computation that have theoretical validity.

            Comment


            • #7
              Thank you everyone for the help. George I suspect you are right. the problem is my numbers aren't as close as a would like. I am pretty sure tableau is not doing what I *thought* I told it to do. I will replicate these in stata and then try and replicate it in tableau piece by piece. Tableau is great at what it is, but I wish it was a scripting language like stata. we need to use it for a popular audience, but the data team insists on scientific rigor. I'd love to crack this nut because so many tableau users use ACS data and these dashboards reach a large non-technical audience.
              Owner of StataTutor.com

              Comment

              Working...
              X