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: one stage cluster with preliliminary stratification
From
Stas Kolenikov <[email protected]>
To
[email protected]
Subject
Re: st: one stage cluster with preliliminary stratification
Date
Wed, 30 Jan 2013 08:30:05 -0600
*** assuming n1, n2, m1, m2, N are contained in the identically named scalars
gen wgt = scalar(n1)/10 if stratum==1
replace wgt = scalar(n2)/8 if stratum==2
assert !missing(wgt)
* cluster size does not matter
*** option 1: poststrata
gen pstrata = 1
gen popsize = scalar(N)
svyset cluster [pw=wgt], strata( stratum ) poststrata( pstrata )
postweight( popsize )
*** option 2: rescale weights
sum wgt
generate wgt2 = wgt*scalar(N)/r(sum)
svyset cluster [pw=wgt2], strata( stratum )
--
-- Stas Kolenikov, PhD, PStat (SSC) :: http://stas.kolenikov.name
-- Senior Survey Statistician, Abt SRBI :: work email kolenikovs at
srbi dot com
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
On Wed, Jan 30, 2013 at 6:32 AM, Subir Mitra <[email protected]> wrote:
> ONE STAGE CLUSTER WITH PRELIMINARY STRATIFICATION -I stratify population N (members living in clusters , which is known) into 2 strata and randomly pick up 10 clusters from 1st stratum and 8 clusters from 2nd stratum (stratum population n1 & n2 and total clusters m1 & m2 in both stratum also known) and all members of the clusters are sampled.
>
> Any guidance to me to find the svyset command in this case, assuming N, m1,m2,n1 and n2 known and I want to make use of it? (The problem is from Schaeffer et al 1996-328 problem 8.19)
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/