Sergio:
-mfx- cannot be used to calculate the ratio of two marginal effects, you will have to derive the
marginal effect yourself, and use -nlcom- to come up with the ratio and its standard error.
Consider the example below. In this ordered probit the probability that a "mean car" falls in the
lowest category of rep78 is the area under a standard normal curve left of -cut1 + xb, whereby xb
is _b[price]*mean price + _b[mpg]*mean mpg + _b[foreign]*mean foreign. Let xb1 be -cut1 + xb.
Similar xb2 is -cut2 + xb, and so on. Also let Phi be the cumulative density function of the
normal distribution, and phi be the probability density function of the standard normal
distribution. So Pr(rep78=1) = -Phi(xb1). The probability that a mean car falls in the second
category is the area under the standard normal curve between xb2 and xb1, so Pr(rep78=2) =
Phi(xb2)-Phi(xb1).
The marginal effect of mpg on the probability that a car is in the lowest category is how much
this probability for being in the lowest category changes for a unit change in mpg, i.e. the first
derivative of -Phi(xb1) with respect to mpg. Using the chain rule you can see that that is
-phi(xb1)*_b[mpg]. Notice that phi is *not* written with a capital letter, so refers to the
probability density function which is the first derivative of the cumulative density function.
Similarly the marginal effect of mpg on the probability to be in the second category is
d(Phi(xb2)-Phi(xb1))/d mpg = phi(xb2)*_b[mpg] - phi(xb1)*_b[mpg]. These are shown in the example
in the first two equations in the -nlcom- command. You can compare the results with the results
from the -mfx- commands at the bottom of the example to check. All that is left to do is compute
the ratio of the two, which is done in the third equation of the -nlcom- command.
Note that the marginal effects are evaluated at the mean of all explanatory variables. In other
words this is a marginal effect for a "typical" car, but not a car that acutally occured in the
data, since no car is 30% foreign and 70% domestic. For this reason some people dislike using
means of dummy variables (in our case foreign) and use the modal category instead. I have used the
mean of foreign because you used the -mfx- command without specifying the -at()- option which
means that you evaluated the marginal effects at the means.
*-----------------begin example-------------------
sysuse auto, clear
recode rep78 2=1 3=2 4=3 5=4
tab rep78
oprobit rep78 price mpg foreign
/*xb for domestic cars with mean price and mpg*/
sum price if rep78~=. & price~=. & mpg~=. & foreign~=.
local mp = r(mean)
sum mpg if rep78~=. & price~=. & mpg~=. & foreign~=.
local mm = r(mean)
sum foreign if rep78~=. & price~=. & mpg~=. & foreign~=.
local mf = r(mean)
local xb1 -_b[cut1:_cons] + _b[price]*`mp' + _b[mpg]*`mm' + _b[foreign]*`mf'
local xb2 -_b[cut2:_cons] + _b[price]*`mp' + _b[mpg]*`mm' + _b[foreign]*`mf'
local xb3 -_b[cut3:_cons] + _b[price]*`mp' + _b[mpg]*`mm' + _b[foreign]*`mf'
nlcom (y2_mpg: - normden(`xb1')*_b[mpg] ) /*
*/ (y3_mpg: normden(`xb2')*_b[mpg] - /*
*/ normden(`xb1')*_b[mpg] ) /*
*/ (y3_y2: (normden(`xb2')*_b[mpg] - /*
*/ normden(`xb1')*_b[mpg]) / /*
*/ (-normden(`xb1')*_b[mpg] ))
mfx compute, predict (outcome(1))
mfx compute, predict (outcome(2))
*------------------end example---------------------
HTH,
Maarten
--- Sergio Goldbaum <sgoldbaum@fgvsp.br> wrote:
> I am trying to adapt a model developed in a 1990 T. Bresnahan and P.
> Reiss paper ("entry in monopoly markets") to Brazilian data.
>
> Following their model, I need to perform a ratio between marginal
> effects after an ordered probit command.
>
> That is, after
>
> . oprobit y x1 x2 x3
>
> where y = 0,1,2
>
> I asked for the marginal effects
>
> . mfx compute, predict (outcome(1))
>
> . mfx compute, predict (outcome(2))
>
> which gave me, say, "dydx1(1)" and "dydx1(2)".
>
> Now, what I need to estimate is "dydx1(2)/dydx1(1)" with its standard
> error.
>
> I guess I need to use "nlcom" command, but I have no clue on how to
> write this last syntax statement, despite all my tries.
>
-----------------------------------------
between 1/2/2006 and 31/3/2006 I will be
visiting the UCLA, during this time the
best way to reach me is by email
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/