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

st: RE: -margins- vs -adjust-

From   "Verkuilen, Jay" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: -margins- vs -adjust-
Date   Wed, 4 Nov 2009 12:43:24 -0500

>After getting an error with -adjust-, I discovered that it
>had been deprecated in version 11. The online help says: <snip>

-adjust- had some nice features that -margins- seems to lack, or else maybe I just don't properly understand. For instance, -adjust- used to be able to take a variable that wasn't in the model as an argument and generate predictions, etc., for it. 


Run a logit model over a continuous covariate, then run -adjust- over a binned version of that covariate to make a nice table of predicted probabilities.  

Let me see if I can make an example:

. sysuse auto
. gen mpg2 = 10*trunc(mpg/10)+5
. logit foreign mpg
. adjust, by(mpg2) pr ci vertical

Which gives:

Dependent variable: foreign     Command: logit
Variable left as is: mpg

mpg2          pr          lb          ub

15     .152759    [.074742    .286956]
25     .353318    [.238384    .488149]
35     .692834    [.411283    .879263]
45      .89765    [.545156    .984657]

Key:  pr         =  Probability
[lb , ub]  =  [95% Confidence Interval]

In short, one of the things I liked about -adjust- was the fact that it was a little bit "hackable." :) I simply haven't had to do any kind of serious analysis using Stata 11 recently (too much other BS to deal with, committees, etc., plus the fact that some RL things intervened) so maybe there is a way and I'm simply not seeing it. 

*   For searches and help try:

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