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, statalist.org is already up and running.


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

Re: st: Adjusted Prevalence from Logistic models


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Adjusted Prevalence from Logistic models
Date   Wed, 24 Oct 2012 13:45:29 +0200

On Wed, Oct 24, 2012 at 1:15 PM, Abdelouahid Tajar wrote:
> You get the same result though!
>
> margins, at(sex==1 _Igroup_2 ==0 _Igroup_3==0 )
>
> uses ,as I understand, sex==1 and group=reference, no?
>
> with xi: margins uses dummy variables created by xi.
>
> Could you please explain why it is dangerous in the case where there is no interaction in the model.

It is dangerous to have a habit of using things that are not meant to
work even though there may be special situations where it does work,
because it is human nature to forget that such "tricks" only works in
very special situations and you will end up using it in situations
where it is not appropriate, for example with the -dydx(). option or
when you do have interactions.  -margins- is designed to work with
factor variables and not -xi:-. As you noticed, there are situations
where -margins- in combination with -xi:- gives you correct answers,
but those are coincidences, and I would not want to rely on
coincidences when doing an analysis.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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