| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: generating std. devs. using svyset
Kristen's simple suggestions and my complex one all give the same
answer. This makes sense--they are mathematically identical. Here
are some numbers from nhanes2, which has n=10,351 and is stratified
and clustered.
Variable Mean SD summ aweight SD complex SD e(V_rs)
height 168.45988 9.699 9.699 9.699
weight 71.900635 15.433 15.432 15.433
bpsystol 126.94579 21.401 21.400 21.401
bpdiast 81.017265 12.794 12.793 12.794
If one wants to compute a CI for the population SD, the answer will
depend on the sample design and a more "complex" approach.
Steve
On Apr 26, 2007, at 4:23 PM, Kristin MacDonald wrote:
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/
*
* 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/