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 |
jpitblado@stata.com (Jeff Pitblado, StataCorp LP) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Stata 11 Mac crashes |

Date |
Mon, 06 Dec 2010 11:25:34 -0600 |

Ulrich Atz <u.atz@lse.ac.uk> is using -margins- after -mlogit-, but Stata crashes in the middle of the -margins- command execution: > I can produce a crash with the following command (all dummy variables) after > a multinomial logit regression: > > margins i.us#i.highed#i.highrelig#(i.us#i.highrel), at(age=50) > > This one for example works -margins > (i.us#i.highed#i.highrelig)#i.us#i.highrel, at(age=50)-, though not as I > intend. (The idea was to interact the first three dummies with an > interaction term.) > > I know this is very little information and that the syntax may actually be > wrong, but I suppose an error would be more appropriate than a crash. I use > Stata/IC 11.1 for Mac (64-bit Intel). > > If the statalist is not the right place to report bugs, I apologise. We have determined that the crash is caused by more than one duplicate variable specified in an interaction; parentheses control the parsing order and can prevent the crash. This will be fixed in the next executable update. In the mean time Ulrich can avoid the crash by specifying a given factor variable only once per interaction. For example, Ulrich's example was . margins i.us#i.highed#i.highrelig#(i.us#i.highrel), at(age=50) The duplicate variables are 'i.us' and 'i.highrelig', and the parentheses add nothing to this interaction specification. The above syntax is equivalent to . margins i.us#i.highed#i.highrelig, at(age=50) In a side note Ulrich said: > (The idea was to interact the first three dummies with an interaction term.) If Ulrich meant to separately interact each of the dummies with another term, then the following syntax might be what Ulrich wants: . margins (us highed)#highrelig, at(age=50) This is a shorthand notation for . margins us#highrelig highed#highrelig, at(age=50) If Ulrich meant to compute the margins for each dummy in addition to their interaction with another term, then Ulrich can type: . margins (us highed)##highrelig, at(age=50) This is a shorthand notation for . margins i.us i.highed i.highrelig us#highrelig highed#highrelig, at(age=50) --Jeff jpitblado@stata.com * * 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/

- Prev by Date:
**Re: Re: st: Uninstalling older versions of stata?** - Next by Date:
**RE: st: replacing previous observations according to current observation, foreach? replace?** - Previous by thread:
**Re: st: Stata 11 Mac crashes** - Next by thread:
**Re: st: Stata 11 Mac crashes** - Index(es):