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

st: RE: stumped with lincom after svymean


From   "Nichols, Austin" <ANichols@ui.urban.org>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: stumped with lincom after svymean
Date   Tue, 31 Aug 2004 10:19:29 -0400

How about
. gen x1=x==1
. gen x2=x==2
. svyreg y x1 x2
. test x1
for starters? The -svytest- command has been supplanted by -test-, FYI.

-----Original Message-----
From: Robert Bozick [mailto:robertbozick@hotmail.com]
Sent: Tuesday, August 31, 2004 10:02 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: stumped with lincom after svymean


Hi Listers -

Here is what I am trying to accomplish.  I have a continuous variable y, and

a categorical variable x.  The categorical variable x has three categories: 
0, 1, and 2.  I want to test whether y is different among the categories of 
my variable x.  My data are collected using a stratfied, cluster design and 
therefore I must use the survey commands.

In previous versions of stata, I would use the code:

svymean y, by(x)
svytest [x]0=[x]1

Stata 8 says that svytest no longer exists and that I should use the lincom 
command.  Maybe the coffee hasn't set in, but I cannot figure out how to do 
replicate the above code using the lincom command based on the information 
from Stata's help screen.

So my question is two-fold:
1 - How do I test group differences using the svy command in Stata 8 based 
on my above example?
2 - Is it possible to estimate a one-way anova to detect group differences 
with svy commands in Stata 8 based on my above example?

Thanks in advance for your help!
Robert

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index