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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Testing the difference of marginal effects in Stata


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Testing the difference of marginal effects in Stata
Date   Mon, 2 May 2011 09:10:57 +0100 (BST)

--- "Mongeon, Kevin" wrote:
> I am running a logit and probit that contains a number of indicator 
> variables.  I would like to test whether the marginal effects of the indicator
> variables are statistically different (one sided) from each other.
> 
> Here is some of my code:
> 
> Logit y constant up1 dn1 up2 dn2
> margins, dydx(*) post
> 
> up1 dn1 up2 dn2 are all indictor variables.  I have other control variables so 
> I cannot drop the constant.

That is not true, you can drop the constant also when there are other control 
variables. Basically, by dropping the constant and adding dummies for all 
categories of your categorical variable you included (in your case) 4 constants,
so it does not influence the effects of the other variables. However, this is
not what you want to do.
 
> What I would like to do is test whether the marginal effects of up1 is greater 
> than dn1.

A marginal effect is a comparison of groups, it is the average probability with
dn1 minus the average probability with presumably dn2. To make that happen you
must define dn2 as your reference category by leaving it out of your model. The
same is true for up2. 

Moreover, if you want to use -margins- you must use the factorvariable notation
for dummy variables. So assuming that there is a categorical variable up that
you turned into up1 and up2, with values 1 for up1 and 2 for up2, and similarly
a variable dn for dn1 and dn2, than you should type:

logit y ib2.up ib2.dn
margins, dydx(*) post
test 1.up = i.dn

To translate the results to a one-sided test, see:
<http://www.stata.com/support/faqs/stat/oneside.html>

Hope this helps,
Maarten
 
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index