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

st: RE: t tests with complex survey data


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: RE: t tests with complex survey data
Date   Mon, 5 May 2003 08:35:52 -0400

You can use -test- after the -svymean- procedure.  Assuming that x2 is
coded 0/1:

	. svymean x1, by(x2)
	. test [x1]0=[x1]1

(If you are using stata 7, then you need to use -svytest- rather than
-test-).

--Nick


-----------------------------------------------------------
 Nicholas Winter, Ph.D.                     P 202.939.5343
 Policy Studies Associates                  F 202.939.5732
 1718 Connecticut Avenue, NW     [email protected]
 Washington, DC 20009-1148           www.policystudies.com
----------------------------------------------------------- 

> -----Original Message-----
> From: Robert Bozick [mailto:[email protected]] 
> Sent: Saturday, May 03, 2003 3:51 PM
> To: [email protected]
> Subject: st: t tests with complex survey data
> 
> 
> Hello Everyone --
> 
> I was wondering if anyone knew how to do a difference of 
> means tests when using complex survey data (clustered, stratified).
> 
> I tried the survey mean procedure:
> svymean (x1) by x2
> 
> However, this just gives me the estimates of x1 for each 
> category of x2.  Is there a way to perform a difference of 
> means that adjusts the standard errors for the clustered, 
> stratified nature of my sample AND gives me the t statistics 
> and p values?
> 
> Thanks in advance!
> 
> *
> *   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