Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: RE: RE: repeating the same analysis for each stratum


From   "Ngo,PT (pgr)" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: RE: repeating the same analysis for each stratum
Date   Tue, 29 Jul 2003 15:14:24 +0100

yes, I follow you for "across strata" calculations.

It is actually possible that within each stratum the PSU be oversampled. I have just come across a reference mentioning proportional allocation plus over-sampling of subpopulation. In which case, Phung's data set should contain variables indicated this over sub-sampling.

However, if that were to be the case, then, to get his statistics _for each statum_ using his larger do file, would the solution not to use a sub-dataset and run his do file, this time with the svyset not cleared but reset with the key variables at the subdomain level?

forvalues k = 1 (1) 26 {
	drop if strata~=`k'
	svyset strata XXX`k'
	svyset psu YYY`k'
	svyset pweight ZZZ`k'
	do analysis.do
	}

TM
-----Original Message-----
From: AMIDON, CARRIE [mailto:[email protected]]
Sent: 29 July 2003 14:38
To: [email protected]
Subject: st: RE: RE: RE: RE: repeating the same analysis for each
stratum


In that case it should be fine to use the if statement. When examining a
subpopulation across strata, though, it is not appropriate to use the if
statement because the variance calculation done by stata requires the
information contained in the observations that do not meet the if
statement for proper calculation.

CA

-----Original Message-----
From: Ngo,PT (pgr) [mailto:[email protected]] 
Sent: Tuesday, July 29, 2003 9:22 AM
To: [email protected]
Subject: st: RE: RE: RE: repeating the same analysis for each stratum


Could I please clarify with you what you mean by a problem with the s.e.
? 

If the PSU _within each stratum_ are selected with probability
proportional to the size of the population, so that the distribution of
sampled households matches the distribution of the population across the
stratum, and the household units within each PSU are selected with equal
probability, would each stratum sample not be a self-weighted sample ?

Thanks in advance,

TM

-----Original Message-----
From: AMIDON, CARRIE [mailto:[email protected]]
Sent: 29 July 2003 13:39
To: [email protected]
Subject: st: RE: RE: repeating the same analysis for each stratum


That would potentially cause a problem with your standard errors since
you are trying to examine a subset. Read the portion of the svy commands
in the manual that deals with subsets of samples in analysis.

C. Amidon

-----Original Message-----
From: Ngo,PT (pgr) [mailto:[email protected]] 
Sent: Tuesday, July 29, 2003 7:38 AM
To: [email protected]
Subject: st: RE: repeating the same analysis for each stratum


Hello Phung,

Would this work ? keep only the data for each stratum, and call your do
file. svyset, clear allows to clear the survey variable which I suppose
you have specified in your main analysis.do file.

forvalues k = 1 (1) 26 {
	drop if strata~=`k'
	svyset, clear
	do analysis.do
	}

Thi Minh Ngo

-----Original Message-----
From: Phung Lang [mailto:[email protected]]
Sent: 29 July 2003 12:44
To: [email protected]
Subject: st: repeating the same analysis for each stratum


Dear Statalist

I have a database for a complex survey with 26 strata and 100 PSUs. I
have done the analysis using the svy components for the entire database,
and now would like to repeat the same analysis for each of the 26
strata. The planned analysis is already a do.file. I have not been able
to figure out how run this do.file for each stratum efficiently as I am
not a programmer. I have tried "by", but it does not work with the
svymean or do command. Can someone give me some advice?  I am using
stata 7.0.

Gratefully yours,
Phung


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

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

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

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

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

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