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: RE: RE: RE: Reference group for categorical interactions


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: RE: Reference group for categorical interactions
Date   Thu, 26 Sep 2013 14:02:16 -0400

Pina-

The interaction table alone will not allow you to predict the relative
magnitude of risks in the corresponding cell and the reference group.
Here's a simple example with two factors. The 22 interaction term is
4.75, yet the risk in the 22 group is half that in the reference group.

. input a b  pos neg
  1. 1 1 20 80
  2. 1 2  5 95
  3. 2 1 10 90
  4. 2 2 10 90
  5. end

. gen tot = pos + neg
. gen prop = pos/tot
. table a b , c(mean prop)
----------------------
          |     b     
        a |    1     2
----------+-----------
        1 |   .2   .05
        2 |   .1    .1
----------------------

. blogit pos tot i.a i.b a#b, or

Logistic regression for grouped data              Number of obs   =        400
                                                  LR chi2(3)      =      11.55
                                                  Prob > chi2     =     0.0091
Log likelihood = -134.90836                       Pseudo R2       =     0.0411
------------------------------------------------------------------------------
    _outcome | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         2.a |   .4444444   .1851852    -1.95   0.052     .1964039    1.005738
         2.b |   .2105263    .110004    -2.98   0.003     .0756027    .5862401
             |
         a#b |
        2 2  |       4.75    3.34276     2.21   0.027     1.195831    18.86763
             |
       _cons |        .25      .0625    -5.55   0.000      .153158    .4080754
------------------------------------------------------------------------------


Steve
[email protected]



> On Sep 25, 2013, at 7:53 PM, Hussein, Mustafa (Mustafa Hussien) wrote:
> 
> Why would you need to reconcile that? The purpose of having interaction terms along with main effects is to get a grasp of the whole picture. Have you tried to see the marginal effects on your separate terms (in your model with interactions)? They may too differ from what you would expect from their ORs. Though widely used, ORs mask the heterogeneity in the marginal effects across subjects, and their interpretation in the presence of interaction terms is not straightforward. I would suggest sticking to the marginal effects at the means, if that's meaningful, or estimate them at some relevant representative values for other covariates. 
> 
> A very user friendly reference (including instructions on some useful commands for interaction effects) is by Karaca-Mandic, Norton & Dowd (2012): http://onlinelibrary.wiley.com/doi/10.1111/j.1475-6773.2011.01314.x/abstract 
> 
> very best,
> -Mustafa    
> ________________________________________
> From: [email protected] [[email protected]] on behalf of Valle, Giuseppina [[email protected]]
> Sent: Wednesday, September 25, 2013 6:30 PM
> To: [email protected]
> Subject: st: RE: RE: Reference group for categorical interactions
> 
> Thank you. That was a thought that crossed my mind. Do you know any way of reconciling this?
> 
> Thanks,
> Pina
> ________________________________________
> From: [email protected] <[email protected]> on behalf of Hussein, Mustafa (Mustafa Hussien) <[email protected]>
> Sent: Wednesday, September 25, 2013 4:13 PM
> To: [email protected]
> Subject: st: RE: Reference group for categorical interactions
> 
> Hi Pina,
> 
> I wonder if that's because of the odds ratios/marginal effects associated with your un-interacted terms "maleoral" and "agesex". Margins takes into account all the ways a given term is expressed on the rhs of your model.
> 
> Hope that helps.
> Mustafa
> ________________________________________
> From: [email protected] [[email protected]] on behalf of Valle, Giuseppina [[email protected]]
> Sent: Wednesday, September 25, 2013 3:20 PM
> To: [email protected]
> Subject: st: Reference group for categorical interactions
> 
> Hello. I am trying to examine an interaction between two categorical predictors, each with 4 categories. For both of the variables:
> 
> 1 = early
> 2 = normative
> 3 = late
> 4 = none
> 
> I want 2 or "normative" to be the referent for both variables, so I use the code:
> 
> fvset base 2 maleoral
> fvset base 2 agesex
> 
> Then for the regression, I run:
> 
> svy, subpop(if gender==1): logistic conflict i.race ///
>        agew4 i.famstw1 fameduc paedmis faminc incmiss adrel ///
>        i.respeduc i.respinc sexforce std nonmar ///
>        i.maleoral i.agesex i.maleoral#i.agesex
> 
> I get the following for the interaction term:
> 
> maleoral#agesex |
>           1 1  |   2.626719   1.802462     1.41   0.162     .6756814     10.2114
>           1 3  |          1  (empty)
>           1 4  |   .6300918   1.185243    -0.25   0.806      .015239    26.05259
>           3 1  |   2.467789   2.386861     0.93   0.352     .3640513    16.72836
>           3 3  |    2.14585   .7743234     2.12   0.036     1.050786    4.382122
>           3 4  |   2.751272   1.981607     1.41   0.162     .6616117      11.441
>           4 1  |   1.601467   1.969695     0.38   0.702     .1404772    18.25703
>           4 3  |   .5788523   .4207023    -0.75   0.453     .1374108    2.438454
>           4 4  |   .3059179   .2770581    -1.31   0.193     .0509737     1.83596
> 
> I thought my reference group was respondents who were normative on "maleoral" AND normative on "agesex." But when I graph these, the results do not line up.
> 
> When I run the code:
> 
> margins maleoral#agesex, subpop(if gender==1) atmeans
> 
> Here is what I get:
> 
> ---------------------------------------------------------------------------------
>                |            Delta-method
>                |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
> ----------------+----------------------------------------------------------------
> maleoral#agesex |
>           1 1  |   .2800785   .0805011     3.48   0.001     .1222993    .4378577
>           1 2  |   .2389972   .1031905     2.32   0.021     .0367476    .4412468
>           1 3  |          .  (not estimable)
>           1 4  |   .0800896   .1295187     0.62   0.536    -.1737624    .3339417
>           2 1  |   .1584989   .0410836     3.86   0.000     .0779765    .2390213
>           2 2  |   .2854029   .0164211    17.38   0.000     .2532181    .3175876
>           2 3  |   .1714103   .0296434     5.78   0.000     .1133102    .2295103
>           2 4  |   .1494563   .0549283     2.72   0.007     .0417989    .2571137
>           3 1  |   .1995144   .1381576     1.44   0.149    -.0712694    .4702983
>           3 2  |   .1763853   .0405574     4.35   0.000     .0968943    .2558763
>           3 3  |   .1922673   .0243652     7.89   0.000     .1445124    .2400222
>           3 4  |   .2058666   .0774489     2.66   0.008     .0540695    .3576636
>           4 1  |   .3372326   .2668201     1.26   0.206    -.1857253    .8601904
>           4 2  |   .4025265    .108945     3.69   0.000     .1889982    .6160547
>           4 3  |   .1680508   .0923209     1.82   0.069    -.0128949    .3489965
>           4 4  |    .083139   .0436156     1.91   0.057     -.002346    .1686239
> 
> According to the odds ratios above, 3 and 3 (late and late) should results in a greater probability of my outcome compared to 2 and 2 (normative and normative), but according to the margins, 3 and 3 = 0.19 and 2 and 2 = 0.28. Am I confused about my reference group?
> 
> Any help would be greatly appreciated.
> 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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