Announcement

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

  • Does 'svy: mean' really store e(V_db) ?

    According to http://www.stata.com/support/faqs/st...ry-statistics/,
    The svy: mean command provides
    1. muhat: an estimate of the population mean (mu)
    2. V_db: an estimate of the variance of muhat accounting for the survey design used to collect the data
    3. V_srs: an estimate of the variance of muhat assuming a simple random sample of the same number of observations
    But the code
    Code:
    webuse nhanes2
    svy: mean iron
    mat list e(V_srs)
    mat list e(V_db)
    in Stata 14 on Windows yields:

    . svy: mean s_library
    (running mean on estimation sample)

    Survey: Mean estimation
    ... [output]

    . mat list e(V_srs)

    symmetric e(V_srs)[1,1]
    iron
    iron .11503952

    . mat list e(V_db)
    matrix e(V_db) not found
    r(111);
    Is this an error in the FAQ? In particular, is e(V) what the FAQ calls e(V_db)?

    Apologies for not producing a sample dataset--is there one of the sysuse datasets that has survey weights? I couldn't find a list

  • #2
    No, there is no e(V_db) returned by svy:mean in version 14 (nor in 15). I think that FAQ was probably written sometime back and perhaps that was what was returned in some earlier version of Stata.

    For advice on things like what a command returns, you shouldn't turn to those FAQ's anyway. It's in the PDF user manuals that come installed with your version of Stata. You can get to it from the Help menu by selecting PDF Documentation. Or you can run -help command_name- and then click on the blue link to the PDF manuals that appears near the top of the help file. The FAQ's are good for explanations of how to calculate things from what Stata does, or tricks for advanced uses of Stata commands. But for information about the commands themselves and how they work, the FAQ can be out of date.

    Anyway, current Stata returns e(V_srs) for the results as if simple random sample, and e(V) is, indeed, what that FAQ calls e(V_db).

    Comment


    • #3
      Oops, please ignore the last line. I wasn't able to edit it when I realized I had left it in.

      Comment


      • #4
        By the way, no need to apologize for not producing a sample data set here. Your code includes a reference to -webuse nhanes2-. That's a perfectly good example. And everybody with Stata installed can get it. Anything that can be reached with -sysuse- or -webuse- would always be fine.

        Added: Crossed with #3.

        Comment


        • #5
          @Clyde Schnyder: terrific, thank you!

          There are occasionally undocumented features, aren't there? For instance, e(V_srs) isn't mentioned explicitly in help svy_estimation or help mean.

          Comment

          Working...
          X