Bookmark and Share

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: Interactions using xtlogit


From   "Sturrock, Hugh" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Interactions using xtlogit
Date   Thu, 10 May 2012 16:20:22 +0000

Maarten,

Thank you so much, that really helps. 

Hugh

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten Buis
Sent: Thursday, May 10, 2012 2:26 AM
To: [email protected]
Subject: Re: st: Interactions using xtlogit

On Thu, May 10, 2012 at 12:33 AM, Sturrock, Hugh wrote:
> I am running a random effects model to model infection data (IsPos) using the xtlogit command and want to include an interaction between 2 categorical variables, one with 3 groups (Dist) and the other with 2 groups (Local). I'd ideally like a single p-value to tell me whether the association between IsPos and Dist is modified by Local.
>
> Assuming ID is the household level ID I'm clustering by, if I run the 
> following
>
> xi:xtlogit IsPos i.Dist*i.Local, i(ID) or
>
> I get two interaction terms DistxLoc_2_2 and DistxLoc_3_2. To see if 
> there is an overall interaction occurring I've used the command
>
> test DistxLoc_2_2 DistxLoc_3_2
>
> My question is, is this the correct approach?

Yes, as long as you interpret the interaction effects as ratios of odds ratios. At first glance some people find that complicated, but if you interpret the model in a step by step basis, starting with the baseline odds, continuing to the odds ratio, and than the ratio of odds ratios it does become as clear as is possible with a complicated concept like an interaction effect. An example of such an analysis is given here:

M.L. Buis (2010) "Stata tip 87: Interpretation of interactions in non-linear models", The Stata Journal, 10(2), pp. 305-308.
<http://www.maartenbuis.nl/publications/interactions.html>

> Also, when do you use # instead of * to indicate an interaction?

Always when the program you use allows it (there are some older programs around, including some of my own, that do not (yet) allow factor variables.).

> Also, if I wanted to make some other pairwise comparisons between interaction groups (i.e. DistxLoc_1_1 with DistxLoc_1_2) how would I do it?

-help margins_pwcompare-

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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index