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: adjust vs. margins revisited

From   "Feiveson, Alan H. (JSC-SK311)" <>
To   "" <>
Subject   st: RE: adjust vs. margins revisited
Date   Fri, 30 Jul 2010 11:21:26 -0500

ROb - I think -margins- can be made to give correct confidence limits if you use something like eyex instead of dydx.


-----Original Message-----
From: [] On Behalf Of Tim Wade
Sent: Friday, July 30, 2010 11:08 AM
Subject: st: adjust vs. margins revisited

Hello Statalisters:

Having recently upgradted to v. 11, I have been testing  -margins-
and, like others have discussed on Statalist, I am trying to reconcile
some results compared to the old -adjust-

Here is a simplified example

sysuse auto.dta
logistic foreign  price mpg weight
adjust price=4000 mpg weight, pr ci
margins, atmeans at(price=4000)

produces the following:

. adjust price=4000 mpg weight, pr ci

     Dependent variable: foreign     Equation: foreign     Command: logistic
 Covariates set to mean: mpg = 21.297297, weight = 3019.4595
 Covariate set to value: price = 4000

      All |         pr          lb          ub
          |    .005861    [.000219    .137016]
     Key:  pr         =  Probability
           [lb , ub]  =  [95% Confidence Interval]

. margins, atmeans at(price=4000)

Adjusted predictions                              Number of obs   =         74
Model VCE    : OIM

Expression   : Pr(foreign), predict()
at           : price           =        4000
               mpg             =     21.2973 (mean)
               weight          =    3019.459 (mean)

             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
       _cons |   .0058613   .0097907     0.60   0.549    -.0133281    .0250508

I read the previous postings by Stata Corp's  Jeff Pitlblado
( where he

"The -pr- confidence intervals from -adjust- are computed by transforming the
end-points of the CI limits from the linear prediction.

-margins- computes the CI limits using the normal approximation is valid."

but here margins produces negative confidence bounds on a probability
and also produces quite different results from -adjust-, which seems
to provide reasonable results. It does not seem plausible that both
results could be considered valid. Any thoughts?

Kind regards, Tim
*   For searches and help try:

*   For searches and help try:

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