| ![]() |
From | Steven Samuels <ssamuels@albany.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: generating std. devs. using svyset |
Date | Thu, 26 Apr 2007 19:49:00 -0400 |
Leslie Hinkson <lhinkson@Princeton.EDU> asked about calculating standard
deviations when working with survey data. One way she can obtain the
population standard deviation is to estimate the mean of the variable using
-svy:mean-. This command returns a matrix e(V_srs) that contains an estimate
of the variance assuming data were collected from a simple random sample
without replacement. The formula for V_srs is
V_srs = (s^2) / n
Therefore, we can use this value along with the sample size in e(N) to obtain
an estimate of the population standard deviation. Here is an example.
webuse nhanes2, clear
svyset
svy: mean height
di "standard deviation = " sqrt(e(N) * el(e(V_srs),1,1)
It turns out that this standard deviation can also be calculated by
-summarize- with aweights. For further details on this, see
http://www.stata.com/support/faqs/stat/supweight.html
-- Kristin
kmacdonald@stata.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |