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: Adjusted Prevalence from Logistic models
From
Maarten Buis <[email protected]>
To
[email protected]
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/