Statalist The Stata Listserver

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

Re: st: svymean

From   Philip Ryan <>
Subject   Re: st: svymean
Date   Sat, 22 Jul 2006 23:51:15 +0930

Norbert does not say if he is using Stata 8 or 9, though I suspect 8, since
-svymean- under 8 has been superseded by -svy: mean- under 9.

No matter.  Both -test- and -lincom- will work after either release.

So, for example under release 9:

svy: mean var1, over(var2)
test [var1]High = [var1]Low

or, especially if you like confidence intervals:

lincom [var1]High - [var1]Low

...assuming High and Low are valid value labels for the grouping variable var2.

I don't have my release 8 manuals with me, but from memory:

svymean var1, by(var2)
test [var1]High = [var1]Low

For variety, and the brevity of a single command, you could (release 9):

svy: regress var1 var2

or (release 8)

svyregress var1 var2

asuming var2 was coded as a 0/1 variable.


Quoting Clive Nicholas <>:

> Norbert Michel wrote:
> > When using the survey command svymean, what, exactly, is the
> > interpretation of the design effect "deff" in the output?
> Check out
> for more on this and other fruit fancies about doing -svy:- analysis in
> Stata. You have to scroll down a bit to learn about -deff-, but you've got
> _lots_ of useful material to go with it, and two neat movies to watch as
> well!
> > Also, if I want to run a difference in means test (using survey data),
> > do I have to do this manually?
> Looking at the options covered by -whelp survey-, that looks tough to do
> if you're looking to get output test statistics. The closest I can get you
> there is
> . svy: mean x, over(y)
> assuming that -x- is continuous and -y- is categorical. But it doesn't
> give t-test-style statistics along with this. Maybe this is correct or
> maybe it's an oversight: hard to say.
> Perhaps other listees can help you out on this point.
> Hope this helps.
> CLIVE NICHOLAS        |t: 0(044)7903 397793
> Politics              |e:
> Newcastle University  |
> Whereever you go and whatever you do, just remember this. No matter how
> many like you, admire you, love you or adore you, the number of people
> turning up to your funeral will be largely determined by local weather
> conditions.
> *
> *   For searches and help try:
> *
> *
> *

Philip Ryan
Associate Professor
Discipline of Public Health

Director, Data Management and Analysis Centre
Associate Dean (IT)
Faculty of Health Sciences

University of Adelaide
5005 South Australia
CRICOS Provider Number 00123M
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright.  If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
*   For searches and help try:

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