Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: plot predicted effects after regression


From   khigbee@stata.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: plot predicted effects after regression
Date   Mon, 10 May 2004 09:19:21 -0500

Yumin Sheng <shengyumin@yahoo.com> asked a question where the
answer provided by several people was to use a constant
variable in the -by()- option of -adjust-.

Richard Williams <Richard.A.Williams.5@nd.edu> commented about
this trick as follows:

> As a sidelight, I've never liked or understood the requirement
> that -adjust- include the -by- parameter; why not just default
> to analyzing all cases at once instead of requiring that
> calculations be done for subgroups?  It can be worked around,
> but it is a minor nuisance so why require it in the first
> place?

When -adjust- was first written, we did not forsee it being used
without -by()-.  However, I now see that this can be useful.  I
will enhance -adjust- so that -by()- is optional.

Look for this enhancement in one of the upcoming ado updates.

Also, thanks to Nick Cox <n.j.cox@durham.ac.uk>, for the
following suggestion:

> Given interest in doing this, a minute detail 
> may be worth noting. 
> 
> Fooling -adjust- by supplying a -by()- variable 
> which is constant (and, strictly, non-missing 
> for the observations of interest) is the trick 
> here which perhaps many have worked out for 
> themselves. 
> 
> It doesn't really matter what the value of the -by()- 
> variable is, subject to those constraints. However, 
> 
> gen all = " " 
> 
> has the best cosmetic effect on the tabular 
> output of -adjust-. To spell this out, 
> -adjust- is happy that the -by()- argument 
> is a string variable, but not happy that 
> it is missing. Setting it to a space
> produces a clean table as below. 
> 
> <cut>

I will take advantage of this idea when I make the change to
-adjust-.

Ken Higbee    khigbee@stata.com
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/



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