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" <[email protected]>
To   "'[email protected]'" <[email protected]>
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:[email protected]]
Sent: Tuesday, August 31, 2004 10:02 AM
To: [email protected]
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!

Is your PC infected? Get a FREE online computer virus scan from McAfee´┐Ż 

*   For searches and help try:

*   For searches and help try:

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