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: How to test the equality of marginal effects after running probit, oprobit or mprobit models


From   "Sharma, Dhiraj" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: How to test the equality of marginal effects after running probit, oprobit or mprobit models
Date   Mon, 21 Oct 2013 21:30:44 +0000

Dear Maarten, this helps, thank you!

Dhiraj

________________________________________
From: [email protected] [[email protected]] on behalf of Maarten Buis [[email protected]]
Sent: Monday, October 21, 2013 5:26 AM
To: [email protected]
Subject: Re: st: How to test the equality of marginal effects after running probit, oprobit or mprobit models

On Sun, Oct 20, 2013 at 6:12 PM, Sharma, Dhiraj wrote:
> 1) I randomized my sample into 5 groups and now I want to test if the sample is balanced for my independent variable (which is binary).  I run probit model and get the marginal effects for the treatment dummies but when I run the –test- command, it seems to be testing the equality of log odds ratio and not the marginal effects.  How do I test the equality of marginal effects?

A -probit- model will not give you log odds ratios; those are returned
by -logit- models.

To test marginal effects you need to use the -post- option in margins.
The logic is that -test- or -testparm- look for results left behind by
an estimation command, and by default the estimation command is
-probit- not -margins-. With the -post- option you ask Stata let
-margins- return its results as if it was an estimation command. Here
is an example:

*------------------ begin example ------------------
sysuse auto, clear
recode rep78 1/2=3
probit foreign weight i.rep78
margins, dydx(rep78) post
testparm i.rep78
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* http://www.maartenbuis.nl/example_faq )


> 2) To see if the sample is balanced for independent variables which have multiple categories, I run –oprobit- or –mprobit- commands and get the marginal effects for each category by using predict(outcome(x)) option.  But then again, how do I test for the equality of marginal effects for each outcome?

You'll need to use the -predict()- option of the -margins- command for
that. You'll need to look at -help oprobit postestimation- and -help
mprobit estimation- for how to specify the -predict()- option. Here is
an example:

*------------------ begin example ------------------
sysuse nlsw88, clear

gen byte occat = cond(occupation < 3                 , 1,      ///
                 cond(inlist(occupation, 5, 6, 8, 13), 2, 3))  ///
                 if occupation < .
label variable occat "occupation in categories"
label define occat 1 "high"   ///
                   2 "middle" ///
                   3 "low"
label value occat occat

oprobit occat i.race grade
est store a

margins, dydx(race) predict(pr outcome(#1)) post
testparm i.race
est restore a
margins, dydx(race) predict(pr outcome(#2)) post
testparm i.race
est restore a
margins, dydx(race) predict(pr outcome(#3)) post
testparm i.race
est restore a
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* http://www.maartenbuis.nl/example_faq )

Hope this helps,
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