Statalist


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

Re: st: Survey data settings


From   Stas Kolenikov <skolenik@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Survey data settings
Date   Mon, 2 Nov 2009 23:19:32 -0500

On 11/2/09, Jackson, Theron Keith (UMSL-Student) <tkjgx2@umsl.edu> wrote:
>  So it is possible to have stata perform 3 different svyset commands
> in the same dataset?

No, you'd have to invent a data structure to represent your design.
Something along the lines of:

gen strata1 = county
gen strata2 = 1
replace strata2 = jail if design_type == "several jails"
egen ultimate_strata = group( strata1 strata2 )

gen PSU = person
replace PSU = cluster if design_type = "several jails"

svyset PSU [pw=sampling_weight], strata( ultimate_strata )

-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index