Additional Slides on STATA coding from Eff Mod/Interaction Small Group on 3/7/19

Additional Slides on STATA coding from Eff Mod/Interaction Small Group on 3/7/19

by June Chan -
Number of replies: 2

HI all, 

Please see attached for the STATA code slides that were discussed during small group last week. Slides 2 and 3 were shown by Monica in class. Slide 1 summarizes what we discussed in class about how/when one can use a model with a cross-product term (to test for statistical interaction, multiplicative), then moving on to modeling cross-classified exposure categories (with dummy variables) to present effect mod/interaction in your tables with a single reference group.


best, 

JMC

In reply to June Chan

Re: Additional Slides on STATA coding from Eff Mod/Interaction Small Group on 3/7/19

by Laura Koth -

thank you for the slides. I am still unclear on exactly what comparisons STATA is making when you use this command which we are taught in BIOSTAT208 (using two ##):

logistic case sex colgrad age snp##smoking

limited output is:

       1.snp |   .9239497   .1433513    -0.51   0.610     .6816852    1.252313

   1.smoking |    3.76362   .5128197     9.73   0.000     2.881533     4.91573

snp#smoking |       

              1 1  |   1.825605   .3284794     3.35   0.001     1.283072    2.597543

VERSUS  this command which you used in HW6 and made a point about the # vs ## but did not provide additional discussion in the hw key as far as I could tell:

logistic case sex colgrad age snp#smoking

limited output is VERY different:

snp#smoking |

        0 1  |    3.76362   .5128197     9.73   0.000     2.881533     4.91573

        1 0  |   .9239497   .1433513    -0.51   0.610     .6816852    1.252313

        1 1  |   6.348352   .8402967    13.96   0.000     4.897699    8.228675


I cannot figure out why the differences between the interaction term output between these two commands and I also shared this with Dr. Shiboski in our lab session, but I still don't have an understanding as to why you are calling the second command output "correct" on the homework vs the output for the first command.

given that the OR of 1.8 for the first command (the way we are taught in 208) is SO different from the OR of 6.3, it seems very important to understand what STATA is doing in these two commands as the answers are very different.


In reply to Laura Koth

Re: Additional Slides on STATA coding from Eff Mod/Interaction Small Group on 3/7/19

by Monica Ospina Romero -
Hi Laura,

The first number (1.82) is the number of multiplicative interaction [OR11/(OR10*OR01)], the second number (6.34) is OR11 or double exposed OR. You can use the first code (logistic case sex colgrad age i.snp##i.smoking) for all your calculations if you feel more comfortable with coding that way. With the right coefficients in your nlcom command, you should be able to get the same answers.

In HW6, the code to answer question 7 will be "logistic case sex colgrad age snp#smoking".  This code gives you the OR’s for each cross-classified exposure group, whereas the code to answer question 8  will be "logistic case sex colgrad age snp##smoking" where you get the multiplicative interaction.

I hope this helps,

Monica