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]

Re: st: RE: margins


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: RE: margins
Date   Wed, 11 May 2011 12:09:48 +0200

On Wed, May 11, 2011 at 11:13 AM, Fitzmaurice, Ann E.
<[email protected]> wrote:
> I have keep the model simple, there are other main effects I would want to enter, I have run the following
>
> logistic preterm2 i.bir_grp2##i.age_gp2a
>
> what I want to use margins for is to create a table of the odds ratios (preferably including confidence intervals) of bir_gr2 (four levels _ by age_gp2a (4 levels) , and this is where I though I want to use margins, perhaps this is not the correct command

As I explained before, such a complete table will give you odds and
not odds ratios. -margins- is not designed for that purpose, but it
can be used by specifying the -expression(exp(predict(xb)))- option.
If you have other explanatory variables you need to be careful in the
sense that you need to make sure that the odds refer to meaningful
groups, use the -at()- option for that.

The trick to check whether you specified your -margins- command
correctly is to see whether you can exactly reproduce those numbers by
choosing appropriate reference categories and interactions using
-logit-. I actually prefer to go the -logit- route, as it forces me to
think exactly about who these numbers are referring to. You reported
to me privately that when you added more control variables Stata
started dropping some of them. That means that there is still some
ambiguity in your model as what group each parameter refers to. That
can only be solved by thinking carefully about the model, which
typically involves starting simple and adding variables and
interactions one at the time and fix any ambiguities as they appear.
This is tedious, frustrating and boring work and it takes a lot of
time, but in the end you'll be rewarded by really understanding the
model that you are presenting.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------

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