Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

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

From   Maarten buis <>
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


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index