Thanks, Ken.
-p
______________________________
Paul F. Visintainer, PhD
Professor and Program Director
Health Quantitative Sciences
School of Public Health
New York Medical College
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Thursday, May 19, 2005 11:22 AM
To: [email protected]
Subject: adjust after anova (was: st: Date: Wed, 18 May 2005 11:00:06
-0400)
Paul Visintainer <[email protected]> asks:
> I'm using Stata v9.0. I noticed that I don't get any output from
> -adjust- after running -anova-. If I run the same model using
> -regress-, the -adjust- command works.
I assume that you did something like
sysuse auto
anova price foreign
adjust foreign
and saw an empty table. And when you instead typed
regress price foreign
adjust foreign
-adjust- produced output.
With -adjust- after -anova- you would instead want to say
anova price foreign
adjust foreign=0
and/or
adjust foreign=1
What is happening? Why the difference?
Saying -adjust foreign- is really the same as saying
-adjust foreign = 0.2972973-. In other words you are asking for
the prediction at the mean of the variable -foreign-.
In -anova- (except for variables specified in the -continuous()-
option), all right-hand-side variables are treated as
categorical. With -anova price foreign-, the -foreign- variable
is treated as a 2 valued variable taking on values 0 and 1. Any
value other than 0 or 1 for foreign when making predictions
(using the -predict- command) would produce a missing value.
-regress- is different. It knows nothing about categorical
variables. It treats all variables as if they were continuous.
So -predict- after -regress- allows a value of 0.2972973 for
-foreign-.
-adjust- is really just a convenience tool for running -predict-.
The differences you are seeing are really due to how -predict-
works after -anova- versus -regress-.
You can read more at
http://www.stata.com/support/faqs/stat/adjusted.html
Though not as directly related, you might also want to see
http://www.stata.com/support/faqs/stat/adjust.html
Ken Higbee [email protected]
StataCorp 1-800-STATAPC
*
* 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/
*
* 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/