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: Adjust versus margins following logistic regression


From   "Seed, Paul" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Adjust versus margins following logistic regression
Date   Thu, 16 Dec 2010 22:32:29 +0000

Dear Statalist, 

Why does StataCorp prefer -margins- over -adjust-?
I am currently using version 11.1 in Windows, and am already 
supposed to use version control.  Is there a risk we will 
lose -adjust- in future versions?

I recently compared -adjust- to -margins- for the estimation of 
adjusted percentages following logistic regression.  The Stata help suggests that 
"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."
But this does not seem to be the case:

-adjust- respected the variable & value labels, produced valid estimates based on 
asymmetric confidence intervals, and allowed me to select the columns output and 
choose the format.  -margins- did none of these things.  The table from -adjust- 
is close to publication quality (after converting proportions to percentages and 
tidying in a Word processor), and could be used for an internal report as it stands.  

The table from -margins- is useless.  Both content and formatting are wrong; and one given 
value is impossible.

The failure to respect labels is a general problem with factor variable handling.
Neither -xi- nor factor variables do well.  It would be a great pity to lose one command 
of the few commands (-tabulate- is another) that gets it right.

Best wishes, 

Paul Seed

The commands 
were:
xi: logistic vbac i.bmi_cat i.parity_cat
adjust _Iparity_ca_2 _Iparity_ca_3, by(bmi_cat) pr ci format(%4.2f)

logistic vbac i.bmi_cat i.parity_cat
margins i.bmi_cat

This gave two tables:


----------------------------------------------
BMI       |
(kg/m2)   |         pr          lb          ub
----------+-----------------------------------
      <20 |       0.35       [0.09       0.75]
    20-25 |       0.39       [0.30       0.50]
    26-30 |       0.49       [0.37       0.62]
      31+ |       0.28       [0.17       0.44]
----------------------------------------------
     Key:  pr         =  Probability
           [lb , ub]  =  [95% Confidence Interval]



Predictive margins                                Number of obs   =        202
Model VCE    : OIM

Expression   : Pr(vbac), predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     bmi_cat |
          1  |    .354512   .1962361     1.81   0.071    -.0301037    .7391277
          2  |   .3956257   .0509108     7.77   0.000     .2958423    .4954091
          3  |    .494516   .0636103     7.77   0.000     .3698422    .6191898
          4  |   .2863436   .0700777     4.09   0.000     .1489939    .4236933
------------------------------------------------------------------------------



*
*   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