Statalist


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

RE: st: Survey data settings


From   "Jackson, Theron Keith (UMSL-Student)" <tkjgx2@umsl.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Survey data settings
Date   Mon, 2 Nov 2009 23:56:24 -0600

Thanks,
 
Theron

________________________________

From: owner-statalist@hsphsun2.harvard.edu on behalf of Stas Kolenikov
Sent: Mon 11/2/2009 10:19 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Survey data settings



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 <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/


<<winmail.dat>>




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