Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Stata 11 Mac crashes
From
Ulrich Atz <[email protected]>
To
[email protected]
Subject
Re: st: Stata 11 Mac crashes
Date
Tue, 7 Dec 2010 09:43:54 +0000
Thanks Jeff and everyone else for your response.
For completeness:
I solved it by generating the interaction term manually.
gen usXhighrelig=us*highrelig
...
margins i.us#i.highed#i.highrelig#i.usXhighrelig, at(age=50)
> Ulrich Atz <[email protected]> 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
> [email protected]
Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
*
* 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/