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 on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ologit_interaction_duplicate enetries found


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ologit_interaction_duplicate enetries found
Date   Mon, 23 May 2011 09:11:00 +0200

On Sun, May 22, 2011 at 11:52 AM, Sanam P wrote:
> I have used an ordered logistic model, using ologit, with interactions included
> in the model.
>
>  xi:ologit  y    i.a*i.b   i.c   i.d   i.e   i.a*i.f   i.a*i.g  ,or
>
> And I have received below error:
>
> initial vector: duplicate entries for y:o._Ia_2 found
>
>
> I saw below qusetion, which was very similar to my question,  in the below
> email, and Maarten's answer to it, when I was searching for an answer to my
> question (please see below emails).
>
>  The only difference is that in my case both variables in the interactions are
> categorical. So I tried:
>
> xi:ologit  y    i.a*i.b   i.c   i.d   i.e   i.a|i.f   i.a|i.g  ,or
>
> but I received below error:
>
>
> I.xxx|I.yyy not allowed
>
>
> Apparently this only works when one of the covariates included in the
> interactions is countiniuos (as it was in the below question in the below
> email).

If you look at the helpfile of -xi- you'll see that i.varn_a|i.varn_b
is not one of the allowed form, it only mentions i.varn_a|varn_b. The
trick to reading helpfiles is to also pay attention to what has not
been written.

If variables f and g are binary variables than leaving the i.prefix
out is a solution

If you have Stata 11 you could leave out the -xi:- prefix and type
ologit y i.a*(i.b i.f i.g)   i.c   i.d   i.e ,or
For more on that see: -help fvvarlist-

Otherwise you can always make the dummy variables and interactions
yourself, see for example:
http://www.ats.ucla.edu/stat/stata/webbooks/reg/chapter3/statareg3.htm

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index