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

Re: st: CI for adjusted mean

From   Rachele Capocchi <>
Subject   Re: st: CI for adjusted mean
Date   Thu, 25 Oct 2007 12:27:16 +0200

Thanks Maarten now I understood how I can resolve my problem, with regress it does work.

In the meantime I tried the predict command after anova and I have obtained the some results compare to regress, so maybe it could be correct.

. anova mpg rep78 wei, continuous( wei)
. predict mean, xb
. summ mean

Thanks a lot, without your answers I could not continue my work !

Have a nice day,

Rachele Capocchi
Agenzia Regionale Sanit Toscana
"U.O. Centro Statistico Elaborazione Dati"
Sede Operativa - viale Milton,7
50134 Firenze
Tel. 055-4624354
Fax. 055-4624345

Maarten buis ha scritto:

--- Rachele Capocchi <> 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 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

___________________________________________________________ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
* For searches and help try:
*   For searches and help try:

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