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 11:56:04 +0200

On Wed, Oct 24, 2012 at 11:46 AM, Abdelouahid Tajar wrote:
> OR, if you use xi
>
>  xi: logit outcome sex i.group,or
>
> margins, at(sex==1 _Igroup_2 ==0 _Igroup_3==0 )

That is dangerous: -margins- needs to know about categorical variables
and especially interactions in order to work well. It gets that
information from the way you use factor variables but not from -xi:-.
By using -xi:- instead of factor variables you are not giving
-margins- the information it needs to work properly. So do not mix
-xi:- with -margins-.

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