user2898391
user2898391

Reputation: 217

Marginal effects in a multinomial logit model with dummy interaction

I have a multinomial model with binary variables that includes an interaction term. When I run my regression as:

mlogit x y x#y, I get sensible output with an estimate for the interaction term at values (0 1) and with two ommissions at (1 0) and (1 1), as I'd expect. However, when I then try to run the command mfx, an error is returned: x#0b: operator invalid r(198)

When I pre-generate the interaction term, such that z = x * y and run mlogit x y z, I can get marginal effects out of the model. However, the parameter estimates for y and z (but not x) differ considerably from the former specification and y becomes significantly different from zero (which is not expected).

As best I can tell, this seems to be an issue with how Stata 11 handles interaction terms. If I run version 10.1: mlogit x y x#y, I get an error that interactions not allowed r(101).

Is there a way I can get mfx to work with the model generated by version 11, or could I use something other than marginal effects to get around that?

Upvotes: 2

Views: 2013

Answers (1)

Roberto Ferrer
Roberto Ferrer

Reputation: 11112

You report three problems which I cover with examples. Comments within the code explain.

clear all
set more off

webuse sysdsn1

*----- problem 1 -----

// error: -mfx- can't handle factor variable notation (use -margins- instead)
mlogit insure age male nonwhite male#nonwhite i.site
mfx

*----- problem 2 -----

// error: factor variable notation is available only with Stata >= 11
version 10: mlogit insure age male nonwhite male#nonwhite i.site

*----- problem 3 -----

// results are the same
mlogit insure age male nonwhite c.male#c.nonwhite i.site

gen mnw = male * nonwhite 
mlogit insure age male nonwhite mnw i.site

Bottomline:

If you have Stata >= 11, factor variable notation (#) is available and the recommended course of action is to use margins, not mfx.

If you have Stata < 11 you must create your own interactions and you can use mfx.

Finally, a statement of inconsistent results can't be assessed properly if you don't provide actual code reproducing the problem (problem 3).

Upvotes: 1

Related Questions