Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: Is there an alternative to -adjust-?


From   "Ariel Linden, DrPH" <[email protected]>
To   <[email protected]>
Subject   st: re: Is there an alternative to -adjust-?
Date   Sat, 24 Dec 2011 11:36:12 -0500

Thanks for the presentation, Richard. Nicely done.

I will punt this request to Stata (who claim to monitor the listserve). 

Perhaps Stata can add a gen() option to -margins-, especially if they intend
to phase out -adjust- in a future version




Date: Fri, 23 Dec 2011 17:43:18 -0500
From: Richard Williams <[email protected]>
Subject: Re: st: Is there an alternative to -adjust-?

At 04:01 PM 12/23/2011, Ariel Linden, DrPH wrote:
>Hi Stata Gurus,
>
>I was wondering if there is an alternative to -adjust- in version 12 that
>can generate predictions? According to the help file,
>
>" adjust has been superseded by margins.  Except for adjust's generate()
and
>stdf options, the margins command can do everything that adjust did and
>more...."  "adjust continues to work but does not support factor variables
>and will often fail if you do not run your estimation command under version
>control, with the version set to less than 11.  This help file remains to
>assist those who encounter an adjust command in old do-files and programs."
>
>This suggests to me that this command (performing this particular function)
>may be phased out. If so, what will replace the following:
>
>********* code*******************
>regress price mpg rep78 headroom trunk weight length foreign
>adjust foreign=1, by(foreign) gen(m1)
>adjust foreign=0, by(foreign) gen(m0)
>
>*********************************

Hardly anything disappears forever in Stata. If nothing else, you 
could probably add a -version 10- command to the top of your code. 
Also see slide 29 of http://www.nd.edu/~rwilliam/stats/Margins01.pdf 
for an example of how to compute adjusted predictions and marginal 
effects for individual cases using Stata 11 or 12. A -gen- function 
for margins is on my personal wish list.


- -------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index