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   Thu, 25 Oct 2007 10:42:15 +0100 (BST)

--- Rachele Capocchi <[email protected]> wrote:
> I tried tried:
> 
> . adjust wei, by(rep) se ci
> 
> and I obtained the adjusted means of the groups, but I don't know how
> I can obtain the overall mean.

sysuse auto, clear
recode rep78 1/2 = 3
xi: reg mpg i.rep78 wei
adjust wei, se ci
adjust wei, se ci by(rep78)

The problem was that anova turned rep78 into a series of dummies, but
did not leave those dummies behind after it finished. Th variables that
aren't mentioned anywhere in the -adjust- command are left as is, but
if they no longer exist Stata doesn't know what to do and reports
nothing. So doing all this explicitly in -regress-, the variables are
left behind, and -adjust- has no problems. Notice that -regress- and 
-anova- are in many cases completely equivalent, so nothing is lost by
moving from -anova- to -regress-.

Hope this helps,
Maarten 

-----------------------------------------
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/
-----------------------------------------


      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html
*
*   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