Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: generating std. devs. using svyset


From   Kristin MacDonald <[email protected]>
To   [email protected]
Subject   Re: st: generating std. devs. using svyset
Date   Thu, 26 Apr 2007 15:23:58 -0500

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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index