Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: ologit_interaction_duplicate enetries found

From   Maarten Buis <>
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.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:

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index