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: RE: RE: problem running mfx after glm


From   Richard Williams <richardwilliams.ndu@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: RE: problem running mfx after glm
Date   Mon, 15 Aug 2011 19:25:00 -0500

At 06:04 PM 8/15/2011, Marlis Gonzalez Fernandez wrote:
I am trying to analyze a new variable (categorical 5 levels) still accounting for marginal effects since audcompCombdiv100 is a proportion so I wrote:

glm audcompCombdiv100 Age Gender0Male1Female DWIVolume i.Discharge_Location, family(binomial) link(logit) robust

mfx, at(mean)

-default predict() is unsuitable for marginal-effect calculation
-r(119);

Is the problem the use of -i.var-?

mfx doesn't like the i. notation. You could compute the dummies yourself, but mfx would not be smart enough to know that the dummies are all inter-related, e.g. if one dummy = 1 the others all have to equal 0. Use margins instead:

margins, dydx(*) atmeans

Also, my own bias would be to drop the -atmeans- option and use the default -asobserved- instead.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

*
*   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