Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Adjusted Prevalence from Logistic models

From   Maarten Buis <>
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,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
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index