Announcement

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

  • How to obtain standard deviation while using Survey data and subpopulation option

    Dear  Stata users , 
    I am using a survey dataset and trying to obtain standard deviation(for mean) after using subpop option.  There were a thread previously, but the discussion was to obtain SD, when subpop option was not specified.(http://www.stata.com/statalist/archi.../msg00581.html). There they used the formula di sqrt(e(N) * el(e(V_srs), 1, 1)) to obtain standard devation.

    However, for my analysis, I am using subpop option.  Can anyone of the stata users please guide me if I am using the correct formula :
    di sqrt(e(N) * el(e(V_srssub), 1, 1))to obtain Standard deviation .

    Code:
      **  STATA CODE START ******
      webuse nhanes2, clear
      svy, subpop(if region==2): mean loglead
      di sqrt(e(N) * el(e(V_srssub), 1, 1))
      estat sd, srs
      **  STATA CODE END ******


    Thank you very much for your time,
    Ritu



  • #2
    The following is correct:

    Code:
    di sqrt(e(N_sub)*el(e(V_srssub), 1, 1))
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Dear Samuels,
      Thank you very much for your help.
      Ritu

      Comment

      Working...
      X