Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

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

From   "Ariel Linden, DrPH" <>
To   <>
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 <>
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()
>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 
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:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index