Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Interaction Terms and Linear Combination

    Hello,

    I am modeling a large case control data set and am having some difficulty understanding the correct linear combination equations to use to generate the ORs I require.

    The dataset has cases and controls of cancer, and I am looking at the effect of diet on risk of cancer, as modified by tobacco use. There are also a number of basic covariates in my model including age, sex, race, daily drinks, and BMI

    Initially, I performed separate logistic regression analyses of never-tobacco users only and found the 4th quartile of grain consumption had an OR of 3.3 compared to 1st quartile, and when performed in ever-tobacco users only, this OR comparing 4th to 1st quartile was 1.8.

    I now want to compare those two groups: Never-tobacco users with the highest grain consumption to Ever-tobacco users with the highest grain consumption, to understand if that diet item contributes higher risk in never-tobacco users.


    My regression is as follows:

    logistic case_recode i.ever_tb_eq i.cerealsqf sex i.ageq i.race i.drink_dayq i.BMIq i.ever_tb_eq##i.cerealsqf

    where
    case_recode: 0 = control, 1 = case
    ever_tb_eq: 0 = never tobacco use, 1 = ever tobacco use
    cerealsqf: 0 = first quartile of use, 1 = 2nd, 2 = 3rd, 3 = 4th

    My reference group by default becomes never-tobacco users with the lowest grain consumption.

    I understand how to use the lincom command to compare different groups to this reference, but I am unsure how to compare the two groups in questions, neither of which are the reference group, using my interaction term.

    I am thinking something along the lines of:

    lincom 0.ever_tb_eq#3.cerealsqf - 1.ever_tb_eq#3.cerealsqf

    Thank you for any help you can provide!
















  • #2
    Close, but not quite right. The odds ratio associated with 1.ever_tb_eq and 3.cerealsqf is given by 1.ever_tb_eq + 3.cerealsqf + 1.ever_tb_eq#3.cerealsqf. Similar considerations for the odds ratio for 0.ever_tb_eq and 3.cerealsqf. So you need to apply -lincom- to the difference between those sums. Now, when you do that, 3.crealsqf by itself will cancel out, but other things remain:
    Code:
    lincom 0.ever_tb_eq - 1.ever_tb_eq  + 0.ever_tb_eq#3.cerealsqf - 1.ever_tb_eq#3.cerealsqf
    and if you want the result in the odds ratio metric you need to add the -or- option.

    Comment


    • #3
      Clyde Schechter Thank you! Makes a lot of sense.

      Comment

      Working...
      X