Hi Arne
Thanks for the suggestions! I have a spreadsheet that estimates the clogit
marginal effects manually. I will try your approach and compare.
I was hoping there was a way to use the mfx commands in STATA so that the
marginal effects would be estimated directly and the significance tests for
the marginal effects would be presented as well.
Jim
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Arne Risa Hole
Sent: Tuesday, August 29, 2006 10:52 AM
To: [email protected]
Subject: Re: st: clogit marginal effects?
Hi James
As far as I can see the marginal effects can be calculated in the same
way as for the multinomial logit model in this case (see e.g. Greene,
2003, pp. 722, for the formula). In the case of the 'female' variable
an alternative approach is to simply calculate the difference in the
probability of choosing a car of a particular nationality assuming the
respondents are female/male, i.e. marginal effect = prob(assuming
female) - prob(assuming male). The program below demonstrates the two
approaches using the choice.dta dataset.
Hope this helps.
Arne
use http://www.stata-press.com/data/r9/choice.dta
gen usa = (car == 1)
gen japan = (car == 2)
gen europe = (car == 3)
gen female = (sex == 0)
gen femJap = female*japan
gen femEur = female*europe
gen incJap = income*japan
gen incEur = income*europe
qui clogit choice japan europe femJap femEur incJap incEur dealer, group(id)
/* Predicted probabilities by nationality */
predict double prob
sort id, stable
by id: egen double prob_USA = sum(prob*usa)
by id: egen double prob_Jap = sum(prob*japan)
by id: egen double prob_Eur = sum(prob*europe)
/* Individual-specific marginal effects for variable female */
gen double meff_fem = prob_USA*(-_b[femJap]*prob_Jap -
_b[femEur]*prob_Eur) if usa == 1
replace meff_fem = prob_Jap*(_b[femJap] - _b[femJap]*prob_Jap -
_b[femEur]*prob_Eur) if japan == 1
replace meff_fem = prob_Eur*(_b[femEur] - _b[femJap]*prob_Jap -
_b[femEur]*prob_Eur) if europe == 1
/* Average marginal effects for variable female */
sum meff_fem if usa == 1
sum meff_fem if japan == 1
sum meff_fem if europe == 1
/* Alternative individual-specific marginal effects for variable female */
/* Predicted probabilities by nationality, all respondents assumed male */
replace femJap = 0
replace femEur = 0
predict double mprob
/* Predicted probabilities by nationality, all respondents assumed female */
replace femJap = japan
replace femEur = europe
predict double fprob
/* Difference in probabilities, female-male */
gen double meff_fem2 = fprob-mprob
/* Alternative average marginal effects for variable female */
sum meff_fem2 if usa == 1
sum meff_fem2 if japan == 1
sum meff_fem2 if europe == 1
On 28/08/06, James Marton <[email protected]> wrote:
> Hello Everyone
>
> I am trying to estimate marginal effects for a conditional logit model
that
> is essentially identical to the one presented as example 5 on page 227 in
> the STATA 9 reference for A-J under the clogit command. In that example,
> each person chooses between 3 types of cars: American (excluded category),
> Japanese, and European. Their choice depends on their sex and income (both
> person specific) and also the number of car dealerships of each type in
> their city (person & choice specific). The dataset is available at:
>
> http://www.stata-press.com/data/r9/choice.dta
>
> Does anyone know how to generate a set of marginal effects for each person
> specific variable? In other words, after running the clogit model whose
> output is given on page 228, I would like to put together a table with the
> following information:
>
> Variable Marginal Effect
>
> Female marginal effect for choosing American if female
> marginal effect for choosing Japanese if female
> marginal effect for choosing European if female
>
> Income marginal effect for choosing American if income inc. by 1 unit
> marginal effect for choosing Japanese if income inc. by 1
> unit
> marginal effect for choosing European if income inc. by 1
> unit
>
> Here the marginal effects for female should sum to one and the marginal
> effects for income should sum to one.
>
> Any suggestions would be greatly appreciated!
>
> Jim Marton
> Assistant Professor
> Martin School of Public Policy and Administration University of Kentucky
> [email protected]
> http://www-martin.uky.edu/~marton
>
>
>
>
> *
> * 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/
>
*
* 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/
*
* 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/