| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: generating std. devs. using svyset
Leslie Hinkson <[email protected]> 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
[email protected]
*
* 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/