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: Adjusted Prevalence from Logistic models


From   Abdelouahid Tajar <[email protected]>
To   statalist <[email protected]>
Subject   RE: st: Adjusted Prevalence from Logistic models
Date   Wed, 24 Oct 2012 12:15:04 +0100

Hi,

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.

Thanks,


Abdelouahid
> Date: Wed, 24 Oct 2012 11:56:04 +0200
> Subject: Re: st: Adjusted Prevalence from Logistic models
> From: [email protected]
> To: [email protected]
> 
> 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/
 		 	   		  
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index