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   Abdelouahid Tajar <a_tajar@hotmail.co.uk>
To   statalist <statalist@hsphsun2.harvard.edu>
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: maartenlbuis@gmail.com
> To: statalist@hsphsun2.harvard.edu
> 
> 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index