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]

From |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: problem using mfx, pred(pu0) after clogit |

Date |
Thu, 26 May 2011 09:49:59 +0200 |

On Wed, May 25, 2011 at 9:53 PM, Samia Costa wrote: > I am using Stata 10.1 and I have been trying to obtain marginal effects after clogit using mfx with the predict(pu0) option. However, when I run the mfx command, I get an output as follows: > > . mfx, pred(pu0) > > warning: predict() expression pu0 unsuitable for standard-error calculation; > option nose imposed > > > Marginal effects after clogit > y = Pr(response|fixed effect is 0) (predict, pu0) > = 2.575e-69 > ------------------------------------------------------------------------------- > variable | dy/dx X > ---------------------------------+--------------------------------------------- > x1 | . 3.44053 > x2*| 1.99e-69 .108374 > x3 | . 1.47502 > ------------------------------------------------------------------------------- > (*) dy/dx is for discrete change of dummy variable from 0 to 1 > > > I can easily obtain the marginal effects after logit or xtlogit, re. Is there any other way I could obtain the marginal effects? The equation I estimate is > > xi:clogit y x1 x2 x3 i.year i.dis, group(number) robust cluster(number) I cannot reproduce that behavior using standard Stata example datasets (I added the -cluster(pairid)- option to make the example as similar to yours, not because I think it is a good idea): *----------------------- begin example ----------------------------- use http://www.stata-press.com/data/r11/lowbirth2.dta xi: clogit low lwt smoke ptd ht ui i.race, /// group(pairid) robust cluster(pairid) mfx, predict(pu0) *------------------------ end example ------------------------------- One thing that strikes me as very suspicious is that Pr(response|fixed effect is 0) in your model is de facto 0 (2.575e-69 = 0.0000000000000000000000000000000000000000000000000000000000000000000002575). This suggest to me that your -clogit- did not converge to a plausible solution. Once you have fixed your -clogit- model, you will probably be able to get marginal effects. It is hard for us to tell you how to fix your -clogit- model, as you did not tell us anything about your -clogit- model, so it is hard for us to diagnose what might be wrong there. The first thing I would do is center all my continuous variables, i.e. subtract a constant such that the value 0 falls within the range of the data. This constant can be the mean, or any other meaningful value. This won't change the model, but these kinds of models tend to converge much better when you center your variables. When that does not work, I would look at the sub-sample used for estimating your -clogit- model. Since -clogit- is a fixed effects model it only uses the variation within groups and drops groups that do not show variation. Within that restricted sample there may be a case of perfect prediction that would not show up in pooled or random effects models. Alternatively, I could imagine trouble arising from variables that show really small within group variation. Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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/

**References**:**st: problem using mfx, pred(pu0) after clogit***From:*Samia Costa <samia.costa@unisg.ch>

- Prev by Date:
**Re: st: Can I run Stata commands in background?** - Next by Date:
**st: Filling Missing Times/Dates and Corresponding Variable Entries** - Previous by thread:
**st: problem using mfx, pred(pu0) after clogit** - Next by thread:
**Re: st: problem using mfx, pred(pu0) after clogit** - Index(es):