Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: clustered data and two weights


From   Katarina Boye <[email protected]>
To   [email protected]
Subject   Re: st: clustered data and two weights
Date   Thu, 14 Sep 2006 15:54:10 +0200

Hej Austin,
-svy- seems to be exactly what I need.
Tack ska du ha!
Katarina

Austin Nichols wrote:
Hej Katarina--

Note that Stata 9.2 -svyset- allows you to specify identifiers for the
first and subsequent stages using the || (double pipe) separator (see
-help svyset- for more detail).  In your case, you might specify the
countrycode as the first-stage PSU and the household or person as the
second, with the pweight (or inverse probability weight) you
constructed as the weight specified in the second stage.  Specifying
whatever strata make sense will reduce your standard errors somewhat,
but you can leave out strata info and live with slightly conservative
SEs.

Alternatively, you can use the cluster(countrycode) option, using the
pweight you made, but I don't think Stata will let you specify the
cluster() option in a svy-prefixed command, so the two approaches are
not combinable.  Note in general clustering arises not only because of
survey design, but also because of data issues (i.e. you could have
clustering of various types even with a simple random sample), but the
math works out the same for both cases.  In general, any result you
can get not using the -svy- prefix (using a pweight and cluster
option, for example) you can get by specifying a specific complex
survey design that corresponds to the same assumptions about the error
structure.

No proof is offered for the claim, but you might try this example:

webuse nmihs, clear
egen mvlbw=mean(vlow), by(agegr)
logit vlowbw mvlbw age miscar [pw=finw]
est store noclust
logit vlowbw mvlbw age miscar [pw=finw], cluster(mvlbw)
est store clust
svy: logit vlowbw mvlbw age miscar
est store svy1
egen popn=total(finw)
svyset agegr, fpc(popn) || idn [pweight=finwgt]
svy: logit vlowbw mvlbw age miscar
est store svy2
est table noclust clust svy1 svy2, se(%6.5f) sty(col)

(paying close attention to the reported standard errors in the second
and fourth models, the cluster model and the oddly -svyset- model).

Lycka till!
--austin

On 9/11/06, Katarina Boye <[email protected]> wrote:
Hi,
I am using data from several European countries (ESS2) and want to use robust standard errors AND the two weights that comes with the dataset.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
--
________________________________________________________________

Katarina Boye
Ph.D. Candidate
Swedish Institute for Social Research (SOFI)
Stockholm University
SE-106 91 Stockholm
Sweden
Phone: +46 8 674 79 97
www.sofi.su.se
________________________________________________________________


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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