Statalist


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

Re: st: CI for adjusted mean


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: CI for adjusted mean
Date   Wed, 24 Oct 2007 10:52:06 +0100 (BST)

Rachele reported to me privately that she had trouble with the example
I sent below, and to my shame I have to admit that I did not run this
example before sending it to the list. 

First of all it contains an error: all the -adjust- commands should
happen immediately after the -anova- command, in other words the -mean-
command should have been placed either before -anova- or after the last
-adjust- command. 

Second, the code for the overal mean adjusted for wei still doesn't
work, and I don't understand why. I expected that this code:

sysuse auto, clear
recode rep78 1/2 = 3
anova mpg rep78 wei, continuous(wei)
adjust wei, se ci

would give me a mean of mpg adjusted for wei (with standard error and
confidence interval), but instead it gives me an empty table. Does
anyone have any thoughts on this one?

-- Maarten

> --- Rachele Capocchi <[email protected]> wrote:
> > I have calculated the adjusted means with Anova command:
> > I need the all mean, which is the command ?
> > I need the IC and SD of the adjusted means, how can I calculate
> > them ?

--- Maarten buis <[email protected]> wrote:
> *--------------- begin example -------------
> sysuse auto, clear
> recode rep78 1/2 = 3
> anova mpg rep78 wei, continuous(wei)
> 
> /* overall mean */
> mean mpg if e(sample)
> 
> /* mean adjusted for wei */
> /* with se and ci */
> adjust wei, se ci
> 
> /* conditional means adjusted for wei */
> /* with se and ci */
> adjust wei, by(rep78) se ci
> *--------------- end example -----------------



-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
*
*   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