Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: creating variable from svy: proportion


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: AW: creating variable from svy: proportion
Date   Mon, 3 May 2010 08:01:11 -0700 (PDT)

--- On Mon, 3/5/10, Guy Grossman wrote:
> sorry for not being sufficiently clear. using the official example at
> I wish to create a variable which is equivalent to the
> proportion of female by race at the county level. meaning all the
> observations within the same county will receive the same value of this
> proportion.

The easiest way is probably to use -regress- on your dummy variable, 
followed by -predict-. A proportion is nothing other than the mean
of an indicator variable, so that is why you can use -regress-, and
-regress- allows the -svy- prefix.

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index